diff --git a/libraries/AP_HAL_SITL/AnalogIn.cpp b/libraries/AP_HAL_SITL/AnalogIn.cpp index 16c4479806..a31025db73 100644 --- a/libraries/AP_HAL_SITL/AnalogIn.cpp +++ b/libraries/AP_HAL_SITL/AnalogIn.cpp @@ -58,8 +58,9 @@ float ADCSource::read_latest() { } } -void ADCSource::set_pin(uint8_t pin) { +bool ADCSource::set_pin(uint8_t pin) { _pin = pin; + return true; } void AnalogIn::init() { diff --git a/libraries/AP_HAL_SITL/AnalogIn.h b/libraries/AP_HAL_SITL/AnalogIn.h index a2c0447f48..ae529705da 100644 --- a/libraries/AP_HAL_SITL/AnalogIn.h +++ b/libraries/AP_HAL_SITL/AnalogIn.h @@ -14,7 +14,7 @@ public: /* implement AnalogSource virtual api: */ float read_average() override; float read_latest() override; - void set_pin(uint8_t p) override; + bool set_pin(uint8_t p) override; float voltage_average() override; float voltage_latest() override; float voltage_average_ratiometric() override {