mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-10 01:44:00 -04:00
Sub: add armed check to preflight baro calibration
This commit is contained in:
parent
00bc528729
commit
abf1a09909
@ -1315,7 +1315,10 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg)
|
|||||||
result = MAV_RESULT_FAILED;
|
result = MAV_RESULT_FAILED;
|
||||||
}
|
}
|
||||||
} else if (is_equal(packet.param3,1.0f)) {
|
} else if (is_equal(packet.param3,1.0f)) {
|
||||||
if (!sub.control_check_barometer() || sub.motors.armed()) {
|
if (sub.motors.armed()) {
|
||||||
|
sub.gcs_send_text(MAV_SEVERITY_INFO, "Disarm before calibration.");
|
||||||
|
result = MAV_RESULT_FAILED;
|
||||||
|
} else if (!sub.control_check_barometer()) {
|
||||||
result = MAV_RESULT_FAILED;
|
result = MAV_RESULT_FAILED;
|
||||||
} else {
|
} else {
|
||||||
sub.init_barometer(true);
|
sub.init_barometer(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user