diff --git a/libraries/AP_HAL_SITL/RCInput.cpp b/libraries/AP_HAL_SITL/RCInput.cpp index 443dd60780..0639d210ac 100644 --- a/libraries/AP_HAL_SITL/RCInput.cpp +++ b/libraries/AP_HAL_SITL/RCInput.cpp @@ -37,10 +37,10 @@ uint8_t RCInput::read(uint16_t* periods, uint8_t len) if (len > SITL_RC_INPUT_CHANNELS) { len = SITL_RC_INPUT_CHANNELS; } - for (uint8_t i=0; i(override); if (override != 0) { return true; } diff --git a/libraries/AP_HAL_SITL/RCInput.h b/libraries/AP_HAL_SITL/RCInput.h index 8a4b971cb1..f18f9790a9 100644 --- a/libraries/AP_HAL_SITL/RCInput.h +++ b/libraries/AP_HAL_SITL/RCInput.h @@ -9,11 +9,9 @@ class HALSITL::RCInput : public AP_HAL::RCInput { public: - RCInput(SITL_State *sitlState) { - _sitlState = sitlState; - } + explicit RCInput(SITL_State *sitlState): _sitlState(sitlState) {} void init() override; - bool new_input() override; + bool new_input() override; uint8_t num_channels() override { return SITL_RC_INPUT_CHANNELS; } @@ -26,7 +24,6 @@ public: private: SITL_State *_sitlState; - bool _valid; /* override state */ uint16_t _override[SITL_RC_INPUT_CHANNELS];