From cbddc7d814f2a7e17cf20ba55929f06fc2083e54 Mon Sep 17 00:00:00 2001 From: Jacob Walser Date: Wed, 30 Nov 2016 18:31:33 -0500 Subject: [PATCH] Sub: Remove control_switch_state struct and reset_control_switch() --- ArduSub/Sub.h | 8 -------- ArduSub/system.cpp | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/ArduSub/Sub.h b/ArduSub/Sub.h index bc5138b000..3a1608af2b 100644 --- a/ArduSub/Sub.h +++ b/ArduSub/Sub.h @@ -266,13 +266,6 @@ private: control_mode_t prev_control_mode; mode_reason_t prev_control_mode_reason = MODE_REASON_UNKNOWN; - // Structure used to detect changes in the flight mode control switch - struct { - int8_t debounced_switch_position; // currently used switch position - int8_t last_switch_position; // switch position in previous iteration - uint32_t last_edge_time_ms; // system time that switch position was last changed - } control_switch_state; - struct { bool running; float max_speed; @@ -955,7 +948,6 @@ private: void report_version(); bool check_if_auxsw_mode_used(uint8_t auxsw_mode_check); bool check_duplicate_auxsw(void); - void reset_control_switch(); uint8_t read_3pos_switch(int16_t radio_in); void read_aux_switches(); void init_aux_switches(); diff --git a/ArduSub/system.cpp b/ArduSub/system.cpp index 0fce46017d..fbfe549d05 100644 --- a/ArduSub/system.cpp +++ b/ArduSub/system.cpp @@ -266,7 +266,7 @@ void Sub::init_ardupilot() // initialise the flight mode and aux switch // --------------------------- - reset_control_switch(); +// reset_control_switch(); init_aux_switches(); startup_INS_ground();