diff --git a/klippy/chelper/stepcompress.c b/klippy/chelper/stepcompress.c index 06cf0799551b..38a00627d2ac 100644 --- a/klippy/chelper/stepcompress.c +++ b/klippy/chelper/stepcompress.c @@ -550,12 +550,9 @@ sync_channel_queue_msg(struct sync_channel *pc, uint32_t *data, int len, { struct queue_message *qm = message_alloc_and_encode(data, len); qm->req_clock = req_clock; - // TODO: Add more slack if min_clock is a bit earlier? qm->min_clock = req_clock; list_add_tail(&qm->node, &pc->msg_queue); - - //TODO: Add queue flush here, or keep in mcu.py? return 0; } diff --git a/klippy/mcu.py b/klippy/mcu.py index 441f218f5b31..0d2005f7f5e1 100644 --- a/klippy/mcu.py +++ b/klippy/mcu.py @@ -269,10 +269,9 @@ def set_pwm(self, print_time, value, cycle_time=None): self._sync_channel, data, len(data), clock) if ret: raise error("Internal error in pwm send") - #self._mcu.flush_moves(print_time) self._th.note_synchronous_command(print_time) return - + # Soft pwm update if cycle_time is None: cycle_time = self._cycle_time @@ -602,10 +601,10 @@ def _connect(self): ffi_main, ffi_lib = chelper.get_ffi() self._steppersync = ffi_main.gc( ffi_lib.steppersync_alloc(self._serial.serialqueue, - self._stepqueues, len(self._stepqueues), - self._sync_channels, len(self._sync_channels), - move_count), - ffi_lib.steppersync_free) + self._stepqueues, len(self._stepqueues), + self._sync_channels, len(self._sync_channels), + move_count), + ffi_lib.steppersync_free) ffi_lib.steppersync_set_time(self._steppersync, 0., self._mcu_freq) # Log config information move_msg = "Configured MCU '%s' (%d moves)" % (self._name, move_count) diff --git a/klippy/toolhead.py b/klippy/toolhead.py index 53df101113dd..71dd2f8af75e 100644 --- a/klippy/toolhead.py +++ b/klippy/toolhead.py @@ -534,12 +534,9 @@ def register_lookahead_callback(self, callback): last_move.timing_callbacks.append(callback) def note_synchronous_command(self, kin_time): self.note_kinematic_activity(kin_time) - # Fixme: will this destroy move queue? - #self._update_move_time(kin_time) - + self._update_move_time(kin_time) # timer will call _flush_handler to check if - # Batch should be sent. - # if not, reschedule. + # Batch should be sent. if not, reschedule. self.reactor.update_timer(self.flush_timer, self.reactor.NOW) def note_kinematic_activity(self, kin_time): self.last_kin_move_time = max(self.last_kin_move_time, kin_time)