@@ -240,7 +240,7 @@ def __init__(self, config):
240240 # Kinematic step generation scan window time tracking
241241 self .kin_flush_delay = SDS_CHECK_TIME
242242 self .kin_flush_times = []
243- self .last_kin_flush_time = self .last_kin_move_time = 0.
243+ self .force_flush_time = self .last_kin_move_time = 0.
244244 # Setup iterative solver
245245 ffi_main , ffi_lib = chelper .get_ffi ()
246246 self .trapq = ffi_main .gc (ffi_lib .trapq_alloc (), ffi_lib .trapq_free )
@@ -279,24 +279,24 @@ def __init__(self, config):
279279 def _update_move_time (self , next_print_time ):
280280 batch_time = MOVE_BATCH_TIME
281281 kin_flush_delay = self .kin_flush_delay
282- lkft = self .last_kin_flush_time
282+ fft = self .force_flush_time
283283 while 1 :
284284 self .print_time = min (self .print_time + batch_time , next_print_time )
285- sg_flush_time = max (lkft , self .print_time - kin_flush_delay )
285+ sg_flush_time = max (fft , self .print_time - kin_flush_delay )
286286 for sg in self .step_generators :
287287 sg (sg_flush_time )
288- free_time = max (lkft , sg_flush_time - kin_flush_delay )
288+ free_time = max (fft , sg_flush_time - kin_flush_delay )
289289 self .trapq_finalize_moves (self .trapq , free_time )
290290 self .extruder .update_move_time (free_time )
291- mcu_flush_time = max (lkft , sg_flush_time - self .move_flush_time )
291+ mcu_flush_time = max (fft , sg_flush_time - self .move_flush_time )
292292 for m in self .all_mcus :
293293 m .flush_moves (mcu_flush_time )
294294 if self .print_time >= next_print_time :
295295 break
296296 def _calc_print_time (self ):
297297 curtime = self .reactor .monotonic ()
298298 est_print_time = self .mcu .estimated_print_time (curtime )
299- kin_time = max (est_print_time + MIN_KIN_TIME , self .last_kin_flush_time )
299+ kin_time = max (est_print_time + MIN_KIN_TIME , self .force_flush_time )
300300 kin_time += self .kin_flush_delay
301301 min_print_time = max (est_print_time + self .buffer_time_start , kin_time )
302302 if min_print_time > self .print_time :
@@ -343,8 +343,8 @@ def flush_step_generation(self):
343343 self .idle_flush_print_time = 0.
344344 flush_time = self .last_kin_move_time + self .kin_flush_delay
345345 flush_time = max (flush_time , self .print_time - self .kin_flush_delay )
346- self .last_kin_flush_time = max (self .last_kin_flush_time , flush_time )
347- self ._update_move_time (max (self .print_time , self .last_kin_flush_time ))
346+ self .force_flush_time = max (self .force_flush_time , flush_time )
347+ self ._update_move_time (max (self .print_time , self .force_flush_time ))
348348 def _flush_lookahead (self ):
349349 if self .special_queuing_state :
350350 return self .flush_step_generation ()
0 commit comments