Hello,
I'm trying to figure out what a bit of code does. I will paste it below and highlight the line that is confusing me. I found this bit of code on the lynxmotion forums and I can't get a hold of anyone who can explain it to me. I understand the purpose of everything generally BUT the glowing yellow portion. What does that question mark do?
{
int Delta = NewPosition - aiLastPositions[iServo];
int CycleTime = 20;
int CntOfCycles = Time / 20;
int DeltaPerCycle = Delta/CntOfCycles;
if (DeltaPerCycle == 0)
{
// Not enough change to do it so...
DeltaPerCycle = (Delta > 0)?1 : -1;
CntOfCycles = abs(Delta);
CycleTime = Time/CntOfCycles;
}