From: Keith Packard Date: Sat, 22 Jan 2022 03:45:14 +0000 (-0800) Subject: data_interval == 0 means no data collection X-Git-Tag: 1.9.10.4~59 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=59cbf80e63b4c88de45e59c6e3d209f99910fcf3;p=fw%2Faltos data_interval == 0 means no data collection All of the timer functions were still taking one sample every 256 clock ticks. Signed-off-by: Keith Packard --- diff --git a/src/stm/ao_timer.c b/src/stm/ao_timer.c index 0d81b5de..eec0a35a 100644 --- a/src/stm/ao_timer.c +++ b/src/stm/ao_timer.c @@ -69,7 +69,7 @@ void stm_systick_isr(void) #endif ao_task_check_alarm(); #if AO_DATA_ALL - if (++ao_data_count == ao_data_interval) { + if (++ao_data_count == ao_data_interval && ao_data_interval) { ao_data_count = 0; #if HAS_FAKE_FLIGHT if (ao_fake_flight_active) diff --git a/src/stm32f4/ao_timer.c b/src/stm32f4/ao_timer.c index 999b587f..83ffe4a7 100644 --- a/src/stm32f4/ao_timer.c +++ b/src/stm32f4/ao_timer.c @@ -49,7 +49,7 @@ void stm_systick_isr(void) #endif ao_task_check_alarm(); #if AO_DATA_ALL - if (++ao_data_count == ao_data_interval) { + if (++ao_data_count == ao_data_interval && ao_data_interval) { ao_data_count = 0; #if HAS_FAKE_FLIGHT if (ao_fake_flight_active) diff --git a/src/stm32l0/ao_timer.c b/src/stm32l0/ao_timer.c index 89193333..6d447fc9 100644 --- a/src/stm32l0/ao_timer.c +++ b/src/stm32l0/ao_timer.c @@ -64,7 +64,7 @@ void stm_systick_isr(void) ++ao_tick_count; ao_task_check_alarm(); #if AO_DATA_ALL - if (++ao_data_count == ao_data_interval) { + if (++ao_data_count == ao_data_interval && ao_data_interval) { ao_data_count = 0; #if HAS_ADC #if HAS_FAKE_FLIGHT diff --git a/src/stmf0/ao_timer.c b/src/stmf0/ao_timer.c index b0b6ec0a..5b180074 100644 --- a/src/stmf0/ao_timer.c +++ b/src/stmf0/ao_timer.c @@ -62,7 +62,7 @@ void stm_systick_isr(void) ++ao_tick_count; ao_task_check_alarm(); #if AO_DATA_ALL - if (++ao_data_count == ao_data_interval) { + if (++ao_data_count == ao_data_interval && ao_data_interval) { ao_data_count = 0; #if HAS_ADC #if HAS_FAKE_FLIGHT