AP_HAL_SITL: AnalogIn: return false for set pin to ANALOG_INPUT_NONE

This commit is contained in:
Iampete1 2024-07-02 13:44:20 +01:00 committed by Peter Barker
parent fb40a7f19d
commit b75c62d267

View File

@ -62,7 +62,7 @@ float ADCSource::read_latest() {
bool ADCSource::set_pin(uint8_t pin) { bool ADCSource::set_pin(uint8_t pin) {
_pin = pin; _pin = pin;
return true; return pin != ANALOG_INPUT_NONE;
} }
void AnalogIn::init() { void AnalogIn::init() {