1
0
Fork 0

use global index variable

This commit is contained in:
Kevin Matz 2019-07-30 13:19:40 -04:00
parent bbf21e2e66
commit 123a186feb
1 changed files with 3 additions and 3 deletions

View File

@ -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;