mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 00:04:02 -04:00
Copter: allow forcing disarm via mavlink using magic number
Based on change by Jon Challinger but using new is_equal function
This commit is contained in:
parent
4486ddc53e
commit
15fe925974
@ -1223,7 +1223,7 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
|||||||
if (init_arm_motors(true)) {
|
if (init_arm_motors(true)) {
|
||||||
result = MAV_RESULT_ACCEPTED;
|
result = MAV_RESULT_ACCEPTED;
|
||||||
}
|
}
|
||||||
} else if (is_zero(packet.param1) && (mode_has_manual_throttle(control_mode) || ap.land_complete)) {
|
} else if (is_zero(packet.param1) && (mode_has_manual_throttle(control_mode) || ap.land_complete || is_equal(packet.param2,21196.0f))) {
|
||||||
init_disarm_motors();
|
init_disarm_motors();
|
||||||
result = MAV_RESULT_ACCEPTED;
|
result = MAV_RESULT_ACCEPTED;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user