From b9a01bcad99f1c74cdb526fbc5fd90f1bd6afb79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Sun, 9 May 2021 11:14:14 +0200 Subject: [PATCH] Fix bug --- firmware/.gitignore | 8 ++++++++ firmware/temp-adc.c | 4 +++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/firmware/.gitignore b/firmware/.gitignore index f53b0c1..3692c0c 100644 --- a/firmware/.gitignore +++ b/firmware/.gitignore @@ -1,3 +1,11 @@ *.elf memmap.map obj/ +*.creator +*.user +*.user* +*.cflags +*.cxxflags +*.files +*.includes +*.config diff --git a/firmware/temp-adc.c b/firmware/temp-adc.c index 13d5258..92ce4e4 100644 --- a/firmware/temp-adc.c +++ b/firmware/temp-adc.c @@ -54,6 +54,8 @@ int32_t temperature_adc_get_temp(void) temp = ((temp_lf_s23_8 / 16) * vdd_lf_s23_8 / FLOAT_TO_S23_8(3.3)) * 16; temp = (get_temp_sensor_cal() << 10) - temp; temp = (temp * 10 / slope) + 300; + + return temp; } static uint32_t get_vrefint_cal(void) @@ -99,4 +101,4 @@ void DMA_CH1_IRQHandler(void) if (isr & DMA_ISR_TCIF1) { process_adc_samples(); } -} \ No newline at end of file +}