mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-10 18:08:30 -04:00
Plane: remove old DO_SET_MODE support
We no longer support setting anything except custom-modes
This commit is contained in:
parent
5a19301606
commit
1304b86d09
@ -1191,31 +1191,6 @@ void GCS_MAVLINK_Plane::handleMessage(mavlink_message_t* msg)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MAV_CMD_DO_SET_MODE:
|
|
||||||
switch ((uint16_t)packet.param1) {
|
|
||||||
case MAV_MODE_MANUAL_ARMED:
|
|
||||||
case MAV_MODE_MANUAL_DISARMED:
|
|
||||||
plane.set_mode(MANUAL, MODE_REASON_GCS_COMMAND);
|
|
||||||
result = MAV_RESULT_ACCEPTED;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAV_MODE_AUTO_ARMED:
|
|
||||||
case MAV_MODE_AUTO_DISARMED:
|
|
||||||
plane.set_mode(AUTO, MODE_REASON_GCS_COMMAND);
|
|
||||||
result = MAV_RESULT_ACCEPTED;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAV_MODE_STABILIZE_DISARMED:
|
|
||||||
case MAV_MODE_STABILIZE_ARMED:
|
|
||||||
plane.set_mode(FLY_BY_WIRE_A, MODE_REASON_GCS_COMMAND);
|
|
||||||
result = MAV_RESULT_ACCEPTED;
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
result = MAV_RESULT_UNSUPPORTED;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
|
|
||||||
case MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN:
|
case MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN:
|
||||||
result = handle_preflight_reboot(packet, plane.quadplane.enable != 0);
|
result = handle_preflight_reboot(packet, plane.quadplane.enable != 0);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user