mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Fixed using myoptarg instead of optarg
This commit is contained in:
@@ -1947,11 +1947,11 @@ lsm303d_main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'R':
|
||||
rotation = (enum Rotation)atoi(optarg);
|
||||
rotation = (enum Rotation)atoi(myoptarg);
|
||||
break;
|
||||
|
||||
case 'a':
|
||||
accel_range = atoi(optarg);
|
||||
accel_range = atoi(myoptarg);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -1621,11 +1621,11 @@ oreoled_main(int argc, char *argv[])
|
||||
while ((ch = px4_getopt(argc, argv, "a:b:", &myoptind, &myoptarg)) != EOF) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
i2c_addr = (int)strtol(optarg, NULL, 0);
|
||||
i2c_addr = (int)strtol(myoptarg, NULL, 0);
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
i2cdevice = (int)strtol(optarg, NULL, 0);
|
||||
i2cdevice = (int)strtol(myoptarg, NULL, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -381,11 +381,11 @@ pca8574_main(int argc, char *argv[])
|
||||
while ((ch = px4_getopt(argc, argv, "a:b:", &myoptind, &myoptarg)) != EOF) {
|
||||
switch (ch) {
|
||||
case 'a':
|
||||
pca8574adr = strtol(optarg, NULL, 0);
|
||||
pca8574adr = strtol(myoptarg, NULL, 0);
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
i2cdevice = strtol(optarg, NULL, 0);
|
||||
i2cdevice = strtol(myoptarg, NULL, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
@@ -545,7 +545,7 @@ pca9685_main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 'b':
|
||||
i2cdevice = strtol(optarg, NULL, 0);
|
||||
i2cdevice = strtol(myoptarg, NULL, 0);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user