mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-06 16:17:39 +08:00
motor_test: fix getopt call
This was trying to use optarg when it should instead use myoptarg.
This commit is contained in:
committed by
Beat Küng
parent
71baa4b54a
commit
c3b462b3d6
@@ -112,12 +112,12 @@ int motor_test_main(int argc, char *argv[])
|
||||
|
||||
case 'm':
|
||||
/* Read in motor number */
|
||||
channel = (int)strtoul(optarg, NULL, 0);
|
||||
channel = (int)strtoul(myoptarg, NULL, 0);
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
/* Read in power value */
|
||||
lval = strtoul(optarg, NULL, 0);
|
||||
lval = strtoul(myoptarg, NULL, 0);
|
||||
|
||||
if (lval > 100) {
|
||||
usage("value invalid");
|
||||
|
||||
Reference in New Issue
Block a user