fix proteus legacy vbatt (#4092)

This commit is contained in:
Matthew Kennedy 2022-04-25 14:08:04 -07:00 committed by GitHub
parent 28d4c6dc72
commit 648f9e623d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -186,6 +186,13 @@ int getInternalAdcValue(const char *msg, adc_channel_e hwChannel) {
return -1;
}
#if USE_ADC3_VBATT_HACK
if (hwChannel == EFI_ADC_7) {
extern adcsample_t vbattSampleProteus;
return vbattSampleProteus;
}
#endif // USE_ADC3_VBATT_HACK
#if EFI_USE_FAST_ADC
if (adcHwChannelEnabled[hwChannel] == ADC_FAST) {
int internalIndex = fastAdc.internalAdcIndexByHardwareIndex[hwChannel];