AP_HAL_Empty: AnalogSource: return bool

This commit is contained in:
Iampete1 2021-09-22 20:48:11 +01:00 committed by Andrew Tridgell
parent f7cba024c1
commit f479964c5a
2 changed files with 4 additions and 3 deletions

View File

@ -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()
{}

View File

@ -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(); }