From 3734ade16f89f02a5ec9922191577aee9a84cc90 Mon Sep 17 00:00:00 2001 From: mj Date: Sun, 27 Mar 2022 12:47:58 +0200 Subject: [PATCH] Fixed voc ticks pointer bug --- fw/Core/Src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fw/Core/Src/main.c b/fw/Core/Src/main.c index 954bb66..030cfc0 100644 --- a/fw/Core/Src/main.c +++ b/fw/Core/Src/main.c @@ -289,7 +289,7 @@ int main(void) sps30_is_connected = 1; } - if (sgp40_measure_raw_signal(voc_ticks) == SGP40_OK) + if (sgp40_measure_raw_signal(&voc_ticks) == SGP40_OK) { sgp40_is_connected = 1; GasIndexAlgorithm_init(&voc_params, GasIndexAlgorithm_ALGORITHM_TYPE_VOC); @@ -384,7 +384,7 @@ int main(void) sgp40_measure_raw_signal_compensated(&voc_ticks_compensated, RH_SHT4x, T_SHT4x); // sgp40_measure_raw_signal(&voc_ticks); /* Sensirion VOC library */ - GasIndexAlgorithm_process(&voc_params, voc_ticks_compensated, &voc_index); + GasIndexAlgorithm_process(&voc_params, voc_ticks_compensated, (int32_t*)&voc_index); }