diff --git a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp index f206e984e1..99e76b1d1c 100644 --- a/libraries/AP_HAL_ChibiOS/AnalogIn.cpp +++ b/libraries/AP_HAL_ChibiOS/AnalogIn.cpp @@ -156,7 +156,7 @@ bool AnalogSource::set_pin(uint8_t pin) return true; } bool found_pin = false; - if (_pin == ANALOG_SERVO_VRSSI_PIN) { + if (pin == ANALOG_SERVO_VRSSI_PIN) { found_pin = true; } else { for (uint8_t i=0; i