From 973ef971438b14e25b1c9d1002f86fab94dad33e Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Sun, 18 Mar 2018 11:23:20 -0400 Subject: pid_calibrate: Move PID calibration logic from heater.py to new file Drop support for M303 and PID_TUNE, and replace it with a new PID_CALIBRATE command. Move the logic for this command from heater.py to a new pid_calibrate.py file in the extras/ directory. Signed-off-by: Kevin O'Connor --- klippy/gcode.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'klippy/gcode.py') diff --git a/klippy/gcode.py b/klippy/gcode.py index dee03a16..050377f0 100644 --- a/klippy/gcode.py +++ b/klippy/gcode.py @@ -369,7 +369,7 @@ class GCodeParser: 'G1', 'G4', 'G28', 'M18', 'M400', 'G20', 'M82', 'M83', 'G90', 'G91', 'G92', 'M114', 'M206', 'M220', 'M221', 'M105', 'M104', 'M109', 'M140', 'M190', 'M106', 'M107', - 'M112', 'M115', 'IGNORE', 'QUERY_ENDSTOPS', 'GET_POSITION', 'PID_TUNE', + 'M112', 'M115', 'IGNORE', 'QUERY_ENDSTOPS', 'GET_POSITION', 'RESTART', 'FIRMWARE_RESTART', 'ECHO', 'STATUS', 'HELP'] # G-Code movement commands cmd_G1_aliases = ['G0'] @@ -569,18 +569,6 @@ class GCodeParser: "gcode homing: %s" % ( mcu_pos, stepper_pos, kinematic_pos, toolhead_pos, gcode_pos, origin_pos, homing_pos)) - cmd_PID_TUNE_help = "Run PID Tuning" - cmd_PID_TUNE_aliases = ["M303"] - def cmd_PID_TUNE(self, params): - # Run PID tuning - heater_index = self.get_int('E', params, 0) - if (heater_index < -1 or heater_index >= len(self.heaters) - 1 - or self.heaters[heater_index] is None): - self.respond_error("Heater not configured") - heater = self.heaters[heater_index] - temp = self.get_float('S', params) - heater.start_auto_tune(temp) - self.bg_temp(heater) def request_restart(self, result): if self.is_printer_ready: self.respond_info("Preparing to restart...") -- cgit v1.2.3-70-g09d2