From da729ec6915c0094f111609d9f9b7e46162b8c13 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Sun, 25 Feb 2018 22:46:21 +0000 Subject: adc-power: add parallel parent makefile and fix the bugs it shows from me not maintaining this code! --- tests/adc-power/adc-power.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tests/adc-power/adc-power.c') diff --git a/tests/adc-power/adc-power.c b/tests/adc-power/adc-power.c index 0904bb3..bcd9c87 100644 --- a/tests/adc-power/adc-power.c +++ b/tests/adc-power/adc-power.c @@ -147,6 +147,7 @@ static float adc_calc_tempf(unsigned int ts_v, unsigned int vref) { float slope = (110-30) * 1.0f / (ST_TSENSE_CAL2_110C - ST_TSENSE_CAL1_30C) * 1.0f; return slope * (adjusted_vtemp - ST_TSENSE_CAL1_30C) + 30; #else + (void)vref; return ts_v * 1.0; #endif } @@ -157,6 +158,7 @@ static int adc_calc_tempi(unsigned int ts, unsigned int vref) { int slope = (110-30) / (ST_TSENSE_CAL2_110C - ST_TSENSE_CAL1_30C); return slope * (adjusted_vtemp - ST_TSENSE_CAL1_30C) + 30; #else + (void)vref; return ts * 1.00; #endif } -- cgit