forked from Archive/PX4-Autopilot
motor_test: fix getopt call
This was trying to use optarg when it should instead use myoptarg.
This commit is contained in:
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");
|
||||
|
|
Loading…
Reference in New Issue