Browse Source

motor_test: fix use of negative channel

sbg
Lucas De Marchi 8 years ago committed by Beat Küng
parent
commit
26d107923b
  1. 4
      src/systemcmds/motor_test/motor_test.c

4
src/systemcmds/motor_test/motor_test.c

@ -112,7 +112,7 @@ int motor_test_main(int argc, char *argv[]) @@ -112,7 +112,7 @@ int motor_test_main(int argc, char *argv[])
case 'm':
/* Read in motor number */
channel = (int)strtoul(myoptarg, NULL, 0);
channel = (int)strtol(myoptarg, NULL, 0);
break;
case 'p':
@ -153,7 +153,7 @@ int motor_test_main(int argc, char *argv[]) @@ -153,7 +153,7 @@ int motor_test_main(int argc, char *argv[])
}
if (run_test) {
if (channel == -1) {
if (channel < 0) {
for (int i = 0; i < 8; ++i) {
motor_test(i, value);
usleep(10000);

Loading…
Cancel
Save