Skip to content

Commit

Permalink
toolhead: Rename note_kinematic_activity() to note_mcu_movequeue_acti…
Browse files Browse the repository at this point in the history
…vity()

Rename this function to make it more clear why it is called.

Signed-off-by: Kevin O'Connor <[email protected]>
  • Loading branch information
KevinOConnor committed Jan 18, 2024
1 parent 6cc409f commit 1d92be7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion klippy/extras/force_move.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def manual_move(self, stepper, dist, speed, accel=0.):
print_time + 99999.9)
stepper.set_trapq(prev_trapq)
stepper.set_stepper_kinematics(prev_sk)
toolhead.note_kinematic_activity(print_time)
toolhead.note_mcu_movequeue_activity(print_time)
toolhead.dwell(accel_t + cruise_t + accel_t)
toolhead.flush_step_generation()
def _lookup_stepper(self, gcmd):
Expand Down
2 changes: 1 addition & 1 deletion klippy/extras/manual_stepper.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def do_move(self, movepos, speed, accel, sync=True):
self.trapq_finalize_moves(self.trapq, self.next_cmd_time + 99999.9,
self.next_cmd_time + 99999.9)
toolhead = self.printer.lookup_object('toolhead')
toolhead.note_kinematic_activity(self.next_cmd_time)
toolhead.note_mcu_movequeue_activity(self.next_cmd_time)
if sync:
self.sync_print_time()
def do_homing_move(self, movepos, speed, accel, triggered, check_trigger):
Expand Down
2 changes: 1 addition & 1 deletion klippy/extras/pwm_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def _send_update(self, clock, val):
# Continue flushing to resend time
wakeclock += self._duration_ticks
wake_print_time = self._mcu.clock_to_print_time(wakeclock)
self._toolhead.note_kinematic_activity(wake_print_time)
self._toolhead.note_mcu_movequeue_activity(wake_print_time)
def set_pwm(self, print_time, value):
clock = self._mcu.print_time_to_clock(print_time)
if self._invert:
Expand Down
14 changes: 7 additions & 7 deletions klippy/toolhead.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ def _process_moves(self, moves):
# Generate steps for moves
if self.special_queuing_state:
self._update_drip_move_time(next_move_time)
self.note_kinematic_activity(next_move_time + self.kin_flush_delay,
set_step_gen_time=True)
self.note_mcu_movequeue_activity(next_move_time + self.kin_flush_delay,
set_step_gen_time=True)
self._advance_move_time(next_move_time)
def _flush_lookahead(self):
# Transit from "NeedPrime"/"Priming"/"Drip"/main state to "NeedPrime"
Expand Down Expand Up @@ -503,8 +503,8 @@ def _update_drip_move_time(self, next_print_time):
self.drip_completion.wait(curtime + wait_time)
continue
npt = min(self.print_time + DRIP_SEGMENT_TIME, next_print_time)
self.note_kinematic_activity(npt + self.kin_flush_delay,
set_step_gen_time=True)
self.note_mcu_movequeue_activity(npt + self.kin_flush_delay,
set_step_gen_time=True)
self._advance_move_time(npt)
def drip_move(self, newpos, speed, drip_completion):
self.dwell(self.kin_flush_delay)
Expand Down Expand Up @@ -588,10 +588,10 @@ def register_lookahead_callback(self, callback):
callback(self.get_last_move_time())
return
last_move.timing_callbacks.append(callback)
def note_kinematic_activity(self, kin_time, set_step_gen_time=False):
self.need_flush_time = max(self.need_flush_time, kin_time)
def note_mcu_movequeue_activity(self, mq_time, set_step_gen_time=False):
self.need_flush_time = max(self.need_flush_time, mq_time)
if set_step_gen_time:
self.step_gen_time = max(self.step_gen_time, kin_time)
self.step_gen_time = max(self.step_gen_time, mq_time)
if self.do_kick_flush_timer:
self.do_kick_flush_timer = False
self.reactor.update_timer(self.flush_timer, self.reactor.NOW)
Expand Down

0 comments on commit 1d92be7

Please sign in to comment.