mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 16:49:51 +08:00
motor_test: fix use of negative channel
This commit is contained in:
committed by
Beat Küng
parent
c3b462b3d6
commit
26d107923b
@@ -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[])
|
||||
}
|
||||
|
||||
if (run_test) {
|
||||
if (channel == -1) {
|
||||
if (channel < 0) {
|
||||
for (int i = 0; i < 8; ++i) {
|
||||
motor_test(i, value);
|
||||
usleep(10000);
|
||||
|
||||
Reference in New Issue
Block a user