extruder: Use template evaluation on gcode
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
parent
27ca159285
commit
e60ee861f8
|
@ -41,8 +41,11 @@ class PrinterExtruder:
|
|||
self.stepper.set_max_jerk(9999999.9, 9999999.9)
|
||||
self.max_e_dist = config.getfloat(
|
||||
'max_extrude_only_distance', 50., minval=0.)
|
||||
self.activate_gcode = config.get('activate_gcode', '')
|
||||
self.deactivate_gcode = config.get('deactivate_gcode', '')
|
||||
gcode_macro = self.printer.try_load_module(config, 'gcode_macro')
|
||||
self.activate_gcode = gcode_macro.load_template(
|
||||
config, 'activate_gcode', '')
|
||||
self.deactivate_gcode = gcode_macro.load_template(
|
||||
config, 'deactivate_gcode', '')
|
||||
self.pressure_advance = config.getfloat(
|
||||
'pressure_advance', 0., minval=0.)
|
||||
self.pressure_advance_lookahead_time = config.getfloat(
|
||||
|
@ -75,8 +78,8 @@ class PrinterExtruder:
|
|||
return self.extrude_pos
|
||||
def get_activate_gcode(self, is_active):
|
||||
if is_active:
|
||||
return self.activate_gcode
|
||||
return self.deactivate_gcode
|
||||
return self.activate_gcode.render()
|
||||
return self.deactivate_gcode.render()
|
||||
def stats(self, eventtime):
|
||||
return self.heater.stats(eventtime)
|
||||
def motor_off(self, print_time):
|
||||
|
|
Loading…
Reference in New Issue