motion_queuing: Add register_flush_callback()
Move register_flush_callback() from mcu.py code to motion_queuing module. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -20,11 +20,12 @@ class GCodeRequestQueue:
|
||||
self.rqueue = []
|
||||
self.next_min_flush_time = 0.
|
||||
self.toolhead = None
|
||||
mcu.register_flush_callback(self._flush_notification)
|
||||
motion_queuing = printer.load_object(config, 'motion_queuing')
|
||||
motion_queuing.register_flush_callback(self._flush_notification)
|
||||
printer.register_event_handler("klippy:connect", self._handle_connect)
|
||||
def _handle_connect(self):
|
||||
self.toolhead = self.printer.lookup_object('toolhead')
|
||||
def _flush_notification(self, print_time, clock):
|
||||
def _flush_notification(self, print_time):
|
||||
min_sched_time = self.mcu.min_schedule_time()
|
||||
rqueue = self.rqueue
|
||||
while rqueue:
|
||||
|
||||
Reference in New Issue
Block a user