From f479964c5a9a2b644920f8364c93682cf40a25fa Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Wed, 22 Sep 2021 20:48:11 +0100 Subject: [PATCH] AP_HAL_Empty: AnalogSource: return bool --- libraries/AP_HAL_Empty/AnalogIn.cpp | 5 +++-- libraries/AP_HAL_Empty/AnalogIn.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libraries/AP_HAL_Empty/AnalogIn.cpp b/libraries/AP_HAL_Empty/AnalogIn.cpp index a2bb0e042b..2ce5b286a5 100644 --- a/libraries/AP_HAL_Empty/AnalogIn.cpp +++ b/libraries/AP_HAL_Empty/AnalogIn.cpp @@ -22,8 +22,9 @@ float AnalogSource::read_latest() { return _v; } -void AnalogSource::set_pin(uint8_t p) -{} +bool AnalogSource::set_pin(uint8_t p) { + return true; +} AnalogIn::AnalogIn() {} diff --git a/libraries/AP_HAL_Empty/AnalogIn.h b/libraries/AP_HAL_Empty/AnalogIn.h index 22dcb37c17..b297c93765 100644 --- a/libraries/AP_HAL_Empty/AnalogIn.h +++ b/libraries/AP_HAL_Empty/AnalogIn.h @@ -7,7 +7,7 @@ public: AnalogSource(float v); 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 { return voltage_average(); }