From b17d864d1a3e3410b3dc06e3407b313cc9f02539 Mon Sep 17 00:00:00 2001 From: bugobliterator Date: Mon, 22 Jan 2024 15:56:53 +1100 Subject: [PATCH] AP_HAL_ChibiOS: fix set_pin and _pin_scalar methods for ADC2 and ADC3 --- libraries/AP_HAL_ChibiOS/AnalogIn.cpp | 32 +++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp index ea18857209..0c858f3dcf 100644 --- a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp +++ b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp @@ -148,6 +148,22 @@ float AnalogSource::_pin_scaler(void) break; } } +#ifdef HAL_ANALOG2_PINS + for (uint8_t i=0; i