mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_HAL_ChibiOS: Use correct pin config for ADC2 and ADC3
This commit is contained in:
parent
873e2eac7d
commit
a81f2785aa
@ -150,16 +150,16 @@ float AnalogSource::_pin_scaler(void)
|
|||||||
}
|
}
|
||||||
#ifdef HAL_ANALOG2_PINS
|
#ifdef HAL_ANALOG2_PINS
|
||||||
for (uint8_t i=0; i<ADC2_GRP1_NUM_CHANNELS; i++) {
|
for (uint8_t i=0; i<ADC2_GRP1_NUM_CHANNELS; i++) {
|
||||||
if (AnalogIn::pin_config[i].analog_pin == _pin && (_pin != ANALOG_INPUT_NONE)) {
|
if (AnalogIn::pin_config_2[i].analog_pin == _pin && (_pin != ANALOG_INPUT_NONE)) {
|
||||||
scaling = AnalogIn::pin_config[i].scaling;
|
scaling = AnalogIn::pin_config_2[i].scaling;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAL_ANALOG3_PINS
|
#ifdef HAL_ANALOG3_PINS
|
||||||
for (uint8_t i=0; i<ADC3_GRP1_NUM_CHANNELS; i++) {
|
for (uint8_t i=0; i<ADC3_GRP1_NUM_CHANNELS; i++) {
|
||||||
if (AnalogIn::pin_config[i].analog_pin == _pin && (_pin != ANALOG_INPUT_NONE)) {
|
if (AnalogIn::pin_config_3[i].analog_pin == _pin && (_pin != ANALOG_INPUT_NONE)) {
|
||||||
scaling = AnalogIn::pin_config[i].scaling;
|
scaling = AnalogIn::pin_config_3[i].scaling;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user