mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
commander: fix potentially wrong user message
This commit is contained in:
parent
bd0c1014d9
commit
5ae76bdc17
@ -928,7 +928,13 @@ Commander::handle_command(const vehicle_command_s &cmd)
|
||||
const bool cmd_from_io = (static_cast<int>(roundf(cmd.param3)) == 1234);
|
||||
|
||||
if (cmd_from_manual_stick && !_vehicle_control_mode.flag_control_manual_enabled) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Not arming! Switch to a manual mode first");
|
||||
if (param1_arm == 1) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Not arming! Switch to a manual mode first");
|
||||
|
||||
} else if (param1_arm == 0) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Not disarming! Switch to a manual mode first");
|
||||
}
|
||||
|
||||
cmd_result = vehicle_command_s::VEHICLE_CMD_RESULT_DENIED;
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user