From d794c0fe53076383fe041defc9c7fade0e123edb Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Mon, 25 Mar 2019 19:34:26 +1100 Subject: [PATCH] Rover: add param conversion from MAG_ENABLE to COMPASS_ENABLED --- APMrover2/GCS_Rover.cpp | 1 - APMrover2/Parameters.cpp | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/APMrover2/GCS_Rover.cpp b/APMrover2/GCS_Rover.cpp index 3edb481073..4b128eecc6 100644 --- a/APMrover2/GCS_Rover.cpp +++ b/APMrover2/GCS_Rover.cpp @@ -63,7 +63,6 @@ void GCS_Rover::update_vehicle_sensor_status_flags(void) } AP_AHRS &ahrs = AP::ahrs(); - const Compass &compass = AP::compass(); if (AP::compass().enabled() && AP::compass().healthy(0) && ahrs.use_compass()) { control_sensors_health |= MAV_SYS_STATUS_SENSOR_3D_MAG; diff --git a/APMrover2/Parameters.cpp b/APMrover2/Parameters.cpp index 77bf37bb36..995dd3e901 100644 --- a/APMrover2/Parameters.cpp +++ b/APMrover2/Parameters.cpp @@ -763,6 +763,8 @@ const AP_Param::ConversionInfo conversion_table[] = { { Parameters::k_param_serial2_baud, 0, AP_PARAM_INT16, "SERIAL2_BAUD" }, { Parameters::k_param_throttle_min_old, 0, AP_PARAM_INT8, "MOT_THR_MIN" }, { Parameters::k_param_throttle_max_old, 0, AP_PARAM_INT8, "MOT_THR_MAX" }, + + { Parameters::k_param_compass_enabled_deprecated, 0, AP_PARAM_INT8, "COMPASS_ENABLE" }, }; void Rover::load_parameters(void)