Browse Source

AP_HAL_SITL: AnalogSource: return bool for set_pin

gps-1.3.1
Iampete1 3 years ago committed by Andrew Tridgell
parent
commit
9f04cded3b
  1. 3
      libraries/AP_HAL_SITL/AnalogIn.cpp
  2. 2
      libraries/AP_HAL_SITL/AnalogIn.h

3
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; _pin = pin;
return true;
} }
void AnalogIn::init() { void AnalogIn::init() {

2
libraries/AP_HAL_SITL/AnalogIn.h

@ -14,7 +14,7 @@ public:
/* implement AnalogSource virtual api: */ /* implement AnalogSource virtual api: */
float read_average() override; float read_average() override;
float read_latest() 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_average() override;
float voltage_latest() override; float voltage_latest() override;
float voltage_average_ratiometric() override { float voltage_average_ratiometric() override {

Loading…
Cancel
Save