extruder: Log SET_PRESSURE_ADVANCE changes

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-04-03 11:42:43 -04:00
parent bb8926d67a
commit 0f1a142779
1 changed files with 5 additions and 3 deletions

View File

@ -11,6 +11,7 @@ EXTRUDE_DIFF_IGNORE = 1.02
class PrinterExtruder: class PrinterExtruder:
def __init__(self, printer, config): def __init__(self, printer, config):
self.printer = printer self.printer = printer
self.name = config.get_name()
shared_heater = config.get('shared_heater', None) shared_heater = config.get('shared_heater', None)
if shared_heater is None: if shared_heater is None:
self.heater = heater.PrinterHeater(printer, config) self.heater = heater.PrinterHeater(printer, config)
@ -232,11 +233,12 @@ class PrinterExtruder:
if 'ADVANCE_LOOKAHEAD_TIME' in params: if 'ADVANCE_LOOKAHEAD_TIME' in params:
v = gcode.get_float('ADVANCE_LOOKAHEAD_TIME', params) v = gcode.get_float('ADVANCE_LOOKAHEAD_TIME', params)
self.pressure_advance_lookahead_time = v if v > 0. else 0. self.pressure_advance_lookahead_time = v if v > 0. else 0.
gcode.respond_info( msg = ("pressure_advance: %.6f\n"
"pressure_advance: %.6f\n"
"pressure_advance_lookahead_time: %.6f\n" % ( "pressure_advance_lookahead_time: %.6f\n" % (
self.pressure_advance, self.pressure_advance,
self.pressure_advance_lookahead_time)) self.pressure_advance_lookahead_time))
self.printer.set_rollover_info(self.name, "%s: %s" % (self.name, msg))
gcode.respond_info(msg)
# Dummy extruder class used when a printer has no extruder at all # Dummy extruder class used when a printer has no extruder at all
class DummyExtruder: class DummyExtruder: