adc: onchip: dead boardAdjustVoltage

This commit is contained in:
Andrey Gusakov 2024-12-09 12:43:24 +03:00 committed by rusefillc
parent 89fba98beb
commit 1ad805e1a8
1 changed files with 1 additions and 7 deletions

View File

@ -34,15 +34,9 @@ float getVoltageDivided(const char *msg, adc_channel_e hwChannel) {
return getVoltage(msg, hwChannel) * getAnalogInputDividerCoefficient(hwChannel); return getVoltage(msg, hwChannel) * getAnalogInputDividerCoefficient(hwChannel);
} }
float PUBLIC_API_WEAK boardAdjustVoltage(float voltage, adc_channel_e hwChannel) {
// a hack useful when we do not trust voltage just after board EN was turned on. is this just hiding electrical design flaws?
return voltage;
}
// voltage in MCU universe, from zero to VDD // voltage in MCU universe, from zero to VDD
float getVoltage(const char *msg, adc_channel_e hwChannel) { float getVoltage(const char *msg, adc_channel_e hwChannel) {
float voltage = adcToVolts(getAdcValue(msg, hwChannel)); return adcToVolts(getAdcValue(msg, hwChannel));
return boardAdjustVoltage(voltage, hwChannel);
} }
#if EFI_USE_FAST_ADC #if EFI_USE_FAST_ADC