diff --git a/firmware/controllers/system/timer/event_queue.cpp b/firmware/controllers/system/timer/event_queue.cpp index 5839582f4c..e277e8a647 100644 --- a/firmware/controllers/system/timer/event_queue.cpp +++ b/firmware/controllers/system/timer/event_queue.cpp @@ -94,10 +94,13 @@ efitime_t EventQueue::getNextEventTime(efitime_t nowX) const { if (head != NULL) { if (head->momentX <= nowX) { /** - * We are here if action timestamp is in the past + * We are here if action timestamp is in the past. We should rarely be here since this 'getNextEventTime()' is + * always invoked by 'scheduleTimerCallback' which is always invoked right after 'executeAllPendingActions' - but still, + * for events which are really close to each other we would end up here. * * looks like we end up here after 'writeconfig' (which freezes the firmware) - we are late * for the next scheduled event + * */ efitime_t aBitInTheFuture = nowX + lateDelay; return aBitInTheFuture; diff --git a/firmware/controllers/system/timer/single_timer_executor.cpp b/firmware/controllers/system/timer/single_timer_executor.cpp index add1e31202..120ab0d5c8 100644 --- a/firmware/controllers/system/timer/single_timer_executor.cpp +++ b/firmware/controllers/system/timer/single_timer_executor.cpp @@ -51,7 +51,8 @@ void globalTimerCallback() { SingleTimerExecutor::SingleTimerExecutor() { /** - * todo: a good comment + * See comments in "getNextEventTime" + * todo: is this current value of 'lateDelay' a bit too high? */ queue.setLateDelay(US2NT(100)); }