mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 14:17:35 +08:00
fix batt_smbus: check if module running for custom_command
This commit is contained in:
@@ -571,6 +571,11 @@ int BATT_SMBUS::custom_command(int argc, char *argv[])
|
||||
uint8_t man_name[22];
|
||||
int result = 0;
|
||||
|
||||
if (!is_running()) {
|
||||
PX4_ERR("not running");
|
||||
return -1;
|
||||
}
|
||||
|
||||
BATT_SMBUS *obj = get_instance();
|
||||
|
||||
if (!strcmp(input, "man_info")) {
|
||||
|
||||
Reference in New Issue
Block a user