aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/homing_override.py
Commit message (Collapse)AuthorAgeFilesLines
* homing: Make homing.py an "extras" moduleKevin O'Connor2021-01-081-1/+1
| | | | | | | Move klippy/homing.py to klippy/extras/homing.py and convert the code to an "extras" modules. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_move: Move GCodeMove class from gcode.py to new extras moduleKevin O'Connor2020-08-201-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Split G0/G1 command handling to new gcode_move classKevin O'Connor2020-08-201-2/+2
| | | | | | | | Split up the main GCodeParser class into GCodeDispatch and GCodeMove classes. The GCodeMove class is now available using the "gcode_move" printer object name. This split simplifies the gcode.py code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove "action_" commands from get_status() callsKevin O'Connor2020-08-201-3/+3
| | | | | | | | | | | | Rename printer.gcode.action_emergency_stop() to action_emergency_stop(), printer.gcode.action_respond_info() to action_respond_info(), and printer.gcode.action_respond_error() to action_raise_error() in command templates. This simplifies the get_status() interface, as returning callable functions from that interface was confusing. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Automatically call reset_last_position() on a toolhead set_position()Kevin O'Connor2020-08-201-1/+0
| | | | | | | | Generate a "toolhead:set_position" event on a call to toolhead.set_position() and use that event to automatically call gcode.reset_last_position(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Rename try_load_module() to load_object()Kevin O'Connor2020-05-081-1/+1
| | | | | | | | Rename try_load_module() so that it uses consistent naming for "printer objects". Change the function to raise an error by default if the specified module does not exist. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-6/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Create new wrapper class for gcode command parametersKevin O'Connor2020-05-051-1/+1
| | | | | | | | Instead of passing a dictionary to the command handlers, create a wrapper class and pass that class to the command handlers. This can simplify the command handler code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Return previous handler from register_command(cmd, None)Kevin O'Connor2020-02-121-2/+2
| | | | | | | | When overriding a g-code command, allow the caller to obtain the previous command handler. Use this feature in homing_override and safe_z_home. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Pass params to template evaluationKevin O'Connor2019-06-091-1/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode_macro: Add a default parameter to load_templateKevin O'Connor2019-06-071-1/+0
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Use gcode_macro style templates on gcodeKevin O'Connor2019-04-041-2/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rename run_script() to run_script_from_command()Kevin O'Connor2018-06-301-1/+1
| | | | | | | Emphasize that the run_script() method is only valid when run from a g-code command. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Add axes config parameterHans Raaf2018-06-111-0/+22
| | | | | | | | | Added a config parameter to define the homing override axes. This way one can still home x and y axis without the z-probe cycle coming in the way. Signed-off-by: Hans Raaf <hr-klipper@oderwat.de> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Raise an error if a duplicate command is registeredKevin O'Connor2018-05-201-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Introduce load_config_prefix() for modules that take parametersKevin O'Connor2018-02-031-2/+0
| | | | | | | | Use both load_config() and load_config_prefix() functions when dynamically loading a module from the extras directory - if the config section name has parameters in it then use load_config_prefix(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Allow moves prior to homing an axisKevin O'Connor2018-01-281-2/+15
| | | | | | | Add support for disabling homing checks via the homing_override mechanism. This may be useful to move an axis prior to homing it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing_override: Add basic support for running custom g-code on G28Kevin O'Connor2018-01-281-0/+28
Allow users to override the behavior of G28 using a new "homing_override" config section. This may be used on printers that require specific steps during the homing process. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>