toolhead: Remove unused get_stats() data

The "status" and "printing_time" are now available in the
"idle_timeout" module, so no need to report them from toolhead.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2020-08-15 11:23:50 -04:00
parent b2c78d71b0
commit 9103aaf6d5
1 changed files with 2 additions and 10 deletions

View File

@ -232,7 +232,6 @@ class ToolHead:
self.need_check_stall = -1.
self.flush_timer = self.reactor.register_timer(self._flush_handler)
self.move_queue.set_flush_time(self.buffer_time_high)
self.last_print_start_time = 0.
self.idle_flush_print_time = 0.
self.print_stall = 0
self.drip_completion = None
@ -295,7 +294,7 @@ class ToolHead:
kin_time += self.kin_flush_delay
min_print_time = max(est_print_time + self.buffer_time_start, kin_time)
if min_print_time > self.print_time:
self.print_time = self.last_print_start_time = min_print_time
self.print_time = min_print_time
self.printer.send_event("toolhead:sync_print_time",
curtime, est_print_time, self.print_time)
def _process_moves(self, moves):
@ -492,18 +491,11 @@ class ToolHead:
def get_status(self, eventtime):
print_time = self.print_time
estimated_print_time = self.mcu.estimated_print_time(eventtime)
last_print_start_time = self.last_print_start_time
buffer_time = print_time - estimated_print_time
if buffer_time > -1. or not self.special_queuing_state:
status = "Printing"
else:
status = "Ready"
res = dict(self.kin.get_status(eventtime))
res.update({ 'status': status, 'print_time': print_time,
res.update({ 'print_time': print_time,
'estimated_print_time': estimated_print_time,
'extruder': self.extruder.get_name(),
'position': homing.Coord(*self.commanded_pos),
'printing_time': print_time - last_print_start_time,
'max_velocity': self.max_velocity,
'max_accel': self.max_accel,
'max_accel_to_decel': self.requested_accel_to_decel,