use global index variable
This commit is contained in:
parent
bbf21e2e66
commit
123a186feb
|
@ -206,8 +206,8 @@ void readCommand() {
|
|||
break;
|
||||
}
|
||||
if (c == ',') { // value seperator
|
||||
i++;
|
||||
if (i >= motLength) {
|
||||
index++;
|
||||
if (index >= motLength) {
|
||||
inMessage = false;
|
||||
break;
|
||||
}
|
||||
|
@ -231,7 +231,7 @@ void readCommand() {
|
|||
|
||||
// move the axis
|
||||
int v = ( Msb << 4 ) | Lsb;
|
||||
r.axis(i)->maneuver(v);
|
||||
r.axis(index)->maneuver(v);
|
||||
|
||||
// next
|
||||
continue;
|
||||
|
|
Loading…
Reference in New Issue