From aefb45cf6c6bbecb22d7cfdba4236aab97f1afc1 Mon Sep 17 00:00:00 2001 From: rusefi Date: Sat, 15 Jun 2019 19:46:50 -0400 Subject: [PATCH] docs --- firmware/hw_layer/algo/adc_math.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/firmware/hw_layer/algo/adc_math.h b/firmware/hw_layer/algo/adc_math.h index 0af7edf09e..02f055df61 100644 --- a/firmware/hw_layer/algo/adc_math.h +++ b/firmware/hw_layer/algo/adc_math.h @@ -17,8 +17,10 @@ #define voltsToAdc(volts) ((volts) * (ADC_MAX_VALUE / (engineConfiguration->adcVcc))) +// voltage in MCU universe, from zero to VDD #define getVoltage(msg, hwChannel) (adcToVolts(getAdcValue(msg, hwChannel))) +// Board voltage, with divider coefficient accounted for #define getVoltageDivided(msg, hwChannel) (getVoltage(msg, hwChannel) * engineConfiguration->analogInputDividerCoefficient) #endif /* ADC_MATH_H_ */