Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send text warning to user if they try to calibrate accels or compass while armed #13667

Merged
merged 2 commits into from Mar 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion libraries/AP_Compass/AP_Compass_Calibration.cpp
Expand Up @@ -313,7 +313,7 @@ MAV_RESULT Compass::handle_mag_cal_command(const mavlink_command_long_t &packet)
case MAV_CMD_DO_START_MAG_CAL: {
result = MAV_RESULT_ACCEPTED;
if (hal.util->get_soft_armed()) {
hal.console->printf("Disarm for compass calibration\n");
gcs().send_text(MAV_SEVERITY_NOTICE, "Disarm to allow compass calibration");
result = MAV_RESULT_FAILED;
break;
}
Expand Down
1 change: 1 addition & 0 deletions libraries/GCS_MAVLink/GCS_Common.cpp
Expand Up @@ -3527,6 +3527,7 @@ MAV_RESULT GCS_MAVLINK::handle_command_preflight_calibration(const mavlink_comma
{
if (hal.util->get_soft_armed()) {
// *preflight*, remember?
gcs().send_text(MAV_SEVERITY_NOTICE, "Disarm to allow calibration");
return MAV_RESULT_FAILED;
}
// now call subclass methods:
Expand Down