motor_test: fix getopt call

This was trying to use optarg when it should instead use myoptarg.
This commit is contained in:
Lucas De Marchi 2017-01-09 16:27:51 -08:00 committed by Beat Küng
parent 71baa4b54a
commit c3b462b3d6
1 changed files with 2 additions and 2 deletions

View File

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