From 5912da755b8c792d35aeafdcefcdbed3e6e43125 Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Mon, 17 Jun 2024 11:52:17 -0400 Subject: [PATCH] rc_update: purge deprecated RC switch parameters - these are old RC switch configuration parameters that haven't been used for years, but were hardcoded into old versions of QGC - RC_MAP_RATT_SW, RC_MAP_POSCTL_SW, RC_MAP_ACRO_SW, RC_MAP_STAB_SW, RC_MAP_MAN_SW deleted - --- src/modules/rc_update/params_deprecated.c | 140 ---------------------- src/modules/rc_update/rc_update.cpp | 37 +----- 2 files changed, 1 insertion(+), 176 deletions(-) diff --git a/src/modules/rc_update/params_deprecated.c b/src/modules/rc_update/params_deprecated.c index 93c06dd19c0b..550f2169ee12 100644 --- a/src/modules/rc_update/params_deprecated.c +++ b/src/modules/rc_update/params_deprecated.c @@ -63,143 +63,3 @@ * @value 18 Channel 18 */ PARAM_DEFINE_INT32(RC_MAP_MODE_SW, 0); - -/** - * Rattitude switch channel (deprecated) - * - * @min 0 - * @max 18 - * @group Radio Switches - * @value 0 Unassigned - * @value 1 Channel 1 - * @value 2 Channel 2 - * @value 3 Channel 3 - * @value 4 Channel 4 - * @value 5 Channel 5 - * @value 6 Channel 6 - * @value 7 Channel 7 - * @value 8 Channel 8 - * @value 9 Channel 9 - * @value 10 Channel 10 - * @value 11 Channel 11 - * @value 12 Channel 12 - * @value 13 Channel 13 - * @value 14 Channel 14 - * @value 15 Channel 15 - * @value 16 Channel 16 - * @value 17 Channel 17 - * @value 18 Channel 18 - */ -PARAM_DEFINE_INT32(RC_MAP_RATT_SW, 0); - -/** - * Position Control switch channel (deprecated) - * - * @min 0 - * @max 18 - * @group Radio Switches - * @value 0 Unassigned - * @value 1 Channel 1 - * @value 2 Channel 2 - * @value 3 Channel 3 - * @value 4 Channel 4 - * @value 5 Channel 5 - * @value 6 Channel 6 - * @value 7 Channel 7 - * @value 8 Channel 8 - * @value 9 Channel 9 - * @value 10 Channel 10 - * @value 11 Channel 11 - * @value 12 Channel 12 - * @value 13 Channel 13 - * @value 14 Channel 14 - * @value 15 Channel 15 - * @value 16 Channel 16 - * @value 17 Channel 17 - * @value 18 Channel 18 - */ -PARAM_DEFINE_INT32(RC_MAP_POSCTL_SW, 0); - -/** - * Acro switch channel (deprecated) - * - * @min 0 - * @max 18 - * @group Radio Switches - * @value 0 Unassigned - * @value 1 Channel 1 - * @value 2 Channel 2 - * @value 3 Channel 3 - * @value 4 Channel 4 - * @value 5 Channel 5 - * @value 6 Channel 6 - * @value 7 Channel 7 - * @value 8 Channel 8 - * @value 9 Channel 9 - * @value 10 Channel 10 - * @value 11 Channel 11 - * @value 12 Channel 12 - * @value 13 Channel 13 - * @value 14 Channel 14 - * @value 15 Channel 15 - * @value 16 Channel 16 - * @value 17 Channel 17 - * @value 18 Channel 18 - */ -PARAM_DEFINE_INT32(RC_MAP_ACRO_SW, 0); - -/** - * Stabilize switch channel mapping (deprecated) - * - * @min 0 - * @max 18 - * @group Radio Switches - * @value 0 Unassigned - * @value 1 Channel 1 - * @value 2 Channel 2 - * @value 3 Channel 3 - * @value 4 Channel 4 - * @value 5 Channel 5 - * @value 6 Channel 6 - * @value 7 Channel 7 - * @value 8 Channel 8 - * @value 9 Channel 9 - * @value 10 Channel 10 - * @value 11 Channel 11 - * @value 12 Channel 12 - * @value 13 Channel 13 - * @value 14 Channel 14 - * @value 15 Channel 15 - * @value 16 Channel 16 - * @value 17 Channel 17 - * @value 18 Channel 18 - */ -PARAM_DEFINE_INT32(RC_MAP_STAB_SW, 0); - -/** - * Manual switch channel mapping (deprecated) - * - * @min 0 - * @max 18 - * @group Radio Switches - * @value 0 Unassigned - * @value 1 Channel 1 - * @value 2 Channel 2 - * @value 3 Channel 3 - * @value 4 Channel 4 - * @value 5 Channel 5 - * @value 6 Channel 6 - * @value 7 Channel 7 - * @value 8 Channel 8 - * @value 9 Channel 9 - * @value 10 Channel 10 - * @value 11 Channel 11 - * @value 12 Channel 12 - * @value 13 Channel 13 - * @value 14 Channel 14 - * @value 15 Channel 15 - * @value 16 Channel 16 - * @value 17 Channel 17 - * @value 18 Channel 18 - */ -PARAM_DEFINE_INT32(RC_MAP_MAN_SW, 0); diff --git a/src/modules/rc_update/rc_update.cpp b/src/modules/rc_update/rc_update.cpp index 6aa4ffd20b52..fb5491d7653c 100644 --- a/src/modules/rc_update/rc_update.cpp +++ b/src/modules/rc_update/rc_update.cpp @@ -162,8 +162,8 @@ void RCUpdate::updateParams() || _param_rc_map_pitch.get() > 0 || _param_rc_map_yaw.get() > 0); - // deprecated parameters, will be removed post v1.12 once QGC is updated { + // deprecated parameter, needs to be fully removed from QGC int32_t rc_map_value = 0; if (param_get(param_find("RC_MAP_MODE_SW"), &rc_map_value) == PX4_OK) { @@ -172,41 +172,6 @@ void RCUpdate::updateParams() param_reset(param_find("RC_MAP_MODE_SW")); } } - - if (param_get(param_find("RC_MAP_RATT_SW"), &rc_map_value) == PX4_OK) { - if (rc_map_value != 0) { - PX4_WARN("RC_MAP_RATT_SW deprecated"); - param_reset(param_find("RC_MAP_RATT_SW")); - } - } - - if (param_get(param_find("RC_MAP_POSCTL_SW"), &rc_map_value) == PX4_OK) { - if (rc_map_value != 0) { - PX4_WARN("RC_MAP_POSCTL_SW deprecated"); - param_reset(param_find("RC_MAP_POSCTL_SW")); - } - } - - if (param_get(param_find("RC_MAP_ACRO_SW"), &rc_map_value) == PX4_OK) { - if (rc_map_value != 0) { - PX4_WARN("RC_MAP_ACRO_SW deprecated"); - param_reset(param_find("RC_MAP_ACRO_SW")); - } - } - - if (param_get(param_find("RC_MAP_STAB_SW"), &rc_map_value) == PX4_OK) { - if (rc_map_value != 0) { - PX4_WARN("RC_MAP_STAB_SW deprecated"); - param_reset(param_find("RC_MAP_STAB_SW")); - } - } - - if (param_get(param_find("RC_MAP_MAN_SW"), &rc_map_value) == PX4_OK) { - if (rc_map_value != 0) { - PX4_WARN("RC_MAP_MAN_SW deprecated"); - param_reset(param_find("RC_MAP_MAN_SW")); - } - } } // Center throttle trim when it's set to the minimum to correct for hardcoded QGC RC calibration