mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 17:13:33 +08:00
remove check of myoptind >= argc because: [bkueng](/bkueng)
Because BATT_SMBUS is using a different structure (the ModuleBase class), and `BATT_SMBUS::task_spawn` is only called for the `start` command. This is the reason why you don't need to check for it in here.
This commit is contained in:
@@ -134,11 +134,6 @@ int BATT_SMBUS::task_spawn(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
|
||||
if (myoptind >= argc) {
|
||||
print_usage();
|
||||
return PX4_ERROR;
|
||||
}
|
||||
|
||||
for (unsigned i = 0; i < NUM_BUS_OPTIONS; i++) {
|
||||
|
||||
if (!is_running() && (busid == BATT_SMBUS_BUS_ALL || bus_options[i].busid == busid)) {
|
||||
|
||||
Reference in New Issue
Block a user