Fixed voc ticks pointer bug

This commit is contained in:
mj 2022-03-27 12:47:58 +02:00
parent 1b18164cd1
commit 3734ade16f

View File

@ -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);
}