mirror of https://github.com/Desuuuu/klipper.git
serialqueue: Fix batching of BACKGROUND_PRIORITY_CLOCK messages
In order to properly delay BACKGROUND_PRIORITY_CLOCK messages, they must be 5ms beyond the minimum defined by MIN_REQTIME_DELTA. So, add both MIN_REQTIME_DELTA and MIN_BACKGROUND_DELTA to the timing of these messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
640ff1ad56
commit
99b233df3f
|
@ -726,7 +726,8 @@ check_send_command(struct serialqueue *sq, double eventtime)
|
|||
uint64_t req_clock = qm->req_clock;
|
||||
if (req_clock == BACKGROUND_PRIORITY_CLOCK)
|
||||
req_clock = (uint64_t)(
|
||||
(sq->idle_time - sq->last_clock_time + MIN_BACKGROUND_DELTA)
|
||||
(sq->idle_time - sq->last_clock_time
|
||||
+ MIN_REQTIME_DELTA + MIN_BACKGROUND_DELTA)
|
||||
* sq->est_freq) + sq->last_clock;
|
||||
if (req_clock < min_ready_clock)
|
||||
min_ready_clock = req_clock;
|
||||
|
|
Loading…
Reference in New Issue