Rover: remove non-functional RST_SWITCH_CH parameter

RST_SWITCH_CH is documented as "RC channel to use to reset to last flight
mode after geofence takeover", but nothing in Rover reads it. The member it
binds to, reset_switch_chan, has exactly two references in the tree: its
declaration and its GSCALAR. There is no reset-on-geofence-takeover
behaviour in Rover for it to control.

Plane went through this already. It removed its own RST_SWITCH_CH in favour
of the MODE_SWITCH_RESET RC auxiliary function, and carries a conversion for
it in its conversion_table[]. Rover has no MODE_SWITCH_RESET handler, so
there is nothing here to convert to and no behaviour to preserve: the
parameter is simply doing nothing.

Removed in the usual way, leaving a "RST_SWITCH_CH was here" marker and
keeping the k_param_reset_switch_chan key so the enumeration after it does
not shift.

The companion RESET_SWITCH_CHAN_PWM define, the other half of the same
removed feature, goes in #34213.

This drops Rover:RST_SWITCH_CH from the generated parameter metadata and
nothing else, and saves 80 bytes of flash on SITL.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Henry Wurzburg
2026-09-01 11:41:18 +10:00
committed by Andrew Tridgell
co-authored by Claude Opus 5
parent 48aad66682
commit 81b23bbc9f
2 changed files with 2 additions and 7 deletions
+1 -5
View File
@@ -21,11 +21,7 @@ const AP_Param::Info Rover::var_info[] = {
// @User: Advanced
GSCALAR(log_bitmask, "LOG_BITMASK", DEFAULT_LOG_BITMASK),
// @Param: RST_SWITCH_CH
// @DisplayName: Reset Switch Channel
// @Description: RC channel to use to reset to last flight mode after geofence takeover.
// @User: Advanced
GSCALAR(reset_switch_chan, "RST_SWITCH_CH", 0),
// RST_SWITCH_CH was here
// @Param: INITIAL_MODE
// @DisplayName: Initial driving mode
+1 -2
View File
@@ -41,7 +41,7 @@ public:
//
k_param_log_bitmask_old = 10, // unused
k_param_num_resets_old, // unused
k_param_reset_switch_chan,
k_param_reset_switch_chan, // unused
k_param_initial_mode,
k_param_scheduler,
k_param_relay,
@@ -237,7 +237,6 @@ public:
// Misc
//
AP_Int32 log_bitmask;
AP_Int8 reset_switch_chan;
AP_Int8 initial_mode;
// navigation parameters