X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=src%2Fstm%2Fao_timer.c;h=e07625d8d7d1e809db29f18c5f6deaae388f0869;hp=d69035f82b76227c2033eb3397a15a1d4f3c51f9;hb=e57ab2a7bfb69c0ef9b5b7fa8e53e20a500e7c6c;hpb=b49c751749dcd3e78991463c098f8d916f52179d diff --git a/src/stm/ao_timer.c b/src/stm/ao_timer.c index d69035f8..e07625d8 100644 --- a/src/stm/ao_timer.c +++ b/src/stm/ao_timer.c @@ -44,7 +44,8 @@ void stm_tim6_isr(void) stm_tim6.sr = 0; ++ao_tick_count; #if HAS_TASK_QUEUE - ao_task_check_alarm((uint16_t) ao_tick_count); + if (ao_task_alarm_tick && (int16_t) (ao_tick_count - ao_task_alarm_tick) >= 0) + ao_task_check_alarm((uint16_t) ao_tick_count); #endif #if AO_DATA_ALL if (++ao_data_count == ao_data_interval) {