Sub: remove unused prev_control_mode_reason

This commit is contained in:
Peter Barker 2021-02-03 10:49:13 +11:00 committed by Andrew Tridgell
parent f854477efe
commit 82edfc6237
2 changed files with 0 additions and 3 deletions

View File

@ -216,7 +216,6 @@ private:
control_mode_t control_mode;
control_mode_t prev_control_mode;
ModeReason prev_control_mode_reason = ModeReason::UNKNOWN;
#if RCMAP_ENABLED == ENABLED
RCMapper rcmap;

View File

@ -10,7 +10,6 @@ bool Sub::set_mode(control_mode_t mode, ModeReason reason)
// return immediately if we are already in the desired mode
if (mode == control_mode) {
prev_control_mode = control_mode;
prev_control_mode_reason = control_mode_reason;
control_mode_reason = reason;
return true;
@ -70,7 +69,6 @@ bool Sub::set_mode(control_mode_t mode, ModeReason reason)
exit_mode(control_mode, mode);
prev_control_mode = control_mode;
prev_control_mode_reason = control_mode_reason;
control_mode = mode;
control_mode_reason = reason;