aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics
Commit message (Collapse)AuthorAgeFilesLines
* kinematics: Calculate axis_minimum/axis_maximum in advanceKevin O'Connor2021-01-088-76/+69
| | | | | | | | Calculate the get_status() axis_minimum and axis_maximum fields in advance so that they don't need to be calculated on each get_status() call. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: report all axis limits (min/max)Janar Sööt2020-12-288-15/+76
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* homing: Prefer printer.command_error() instead of homing.CommandError()Kevin O'Connor2020-09-041-2/+4
| | | | | | | Update callers to use the printer.command_error reference instead of directly using homing.CommandError() when raising or catching errors. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Remove EndstopErrorKevin O'Connor2020-09-047-9/+9
| | | | | | | There's no reason to distinguish between an EndstopError and a CommandError, so just use CommandError. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Add a move.move_error() helperKevin O'Connor2020-09-037-22/+17
| | | | | | | Move the EndstopMoveError() code from homing.py to a new method in the toolhead Move class. 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-2/+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>
* polar: fix limit_z default valueArksine2020-08-061-2/+2
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* corexz: Add CoreXZ kinematics (#3129)Voron2020-07-301-0/+101
| | | | | Add a CoreXZ kinematics Signed-off-by: Maks Zolin <mzolin@vorondesign.com>
* extruder_stepper: Don't directly access extruder member variablesKevin O'Connor2020-06-061-2/+4
| | | | | | | | Rework extruder.get_trapq() into extruder.sync_stepper() so that extruder_stepper.py does not need to directly access the extruder internals. 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>
* extruder: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-32/+28
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* cartesian: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Make heater.py an "extras" moduleKevin O'Connor2020-04-251-4/+4
| | | | | | | The heater logic is an independent module that does not need to be treated as part of the "core" klipper code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Move M105 command handling from gcode.py to heater.pyKevin O'Connor2020-04-251-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rotary_delta: The get_status() method should take eventtime parameterKevin O'Connor2020-04-201-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: step_distance must be positive on SET_EXTRUDER_STEP_DISTANCEKevin O'Connor2020-03-281-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: No need to pass stepper_kinematics to set_step_dist()Kevin O'Connor2020-03-281-5/+5
| | | | | | | Also, no need to log in stepper.py as the update is already logged in extruder.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Extruder: Add g-code to set extruder step_distance (#2598)David Smith2020-03-281-0/+17
| | | Signed off by: David Smith <davidosmith@gmail.com>
* safe_z_home: Support note_z_not_homed() in kinematics (#2500)David Smith2020-03-013-0/+9
| | | Signed-off-by: David Smith <davidosmith@gmail.com>
* delta: Add print_radius option to customize valid XY radiusKevin O'Connor2020-01-231-1/+2
| | | | | | Add ability to override the default XY move checking radius. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: Remove support for identifying Z steppersKevin O'Connor2020-01-237-13/+7
| | | | | | | | | The caller can now determine which steppers are connected to cartesian Z movement via the new stepper.is_active_axis() method. It is therefore no longer necessary for the kinematic code to identify these steppers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rotary_delta: Initial support for rotary delta kinematicsKevin O'Connor2020-01-061-0/+224
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Track if using units of radians instead of millimetersKevin O'Connor2020-01-061-1/+2
| | | | | | | | The STEPPER_BUZZ command needs to know if the axis is using radians instead of millimeters so that it can move a more appropriate distance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Simplify DeltaCalibration state trackingKevin O'Connor2020-01-061-42/+46
| | | | | | Limit the use of coordinate descent "params". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* delta: Move low-level delta calibration to delta.pyKevin O'Connor2020-01-061-2/+66
| | | | | | | Move the linear delta specific calibration code from delta_calibrate.py to delta.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder_stepper: Initial support for synchronized extruder steppersSimo Apell2020-01-061-0/+2
| | | | | Signed-off-by: Simo Apell <simo.apell@live.fi> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Do not flush look-ahead queue on a heater temperature updateKevin O'Connor2020-01-031-4/+2
| | | | | | | | | The print_time parameter of heater.set_temp() is not currently used and it isn't necessary to flush the look-ahead queue just get the print_time. Remove the parameter from heater.set_temp() to avoid flushing the look-ahead queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: No need to track extrude_pos locallyKevin O'Connor2019-12-171-4/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Flush step generation on ACTIVATE_EXTRUDERKevin O'Connor2019-12-171-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Move M104/M140 commands from gcode.py to extruder.pyKevin O'Connor2019-12-161-1/+28
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove builtin T0/T1/T2/... command supportKevin O'Connor2019-12-101-13/+0
| | | | | | | | The builtin Tn command is not sufficiently flexible to control some multi-extruder printers. Remove the command and encourage users to define individual gcode_macros for each Tn instance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Add an ACTIVATE_EXTRUDER commandKevin O'Connor2019-12-101-0/+13
| | | | | | | Add support for an extended g-code command to change the currently active extruder. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Apply pressure advance in kin_extruder.cKevin O'Connor2019-12-081-15/+12
| | | | | | | | Implement the pressure advance calculations while performing the definitive integral calculations. This simplifies both the extruder.py and kin_extruder.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Report which axes are homed via get_status()Kevin O'Connor2019-11-246-16/+15
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Report the current extruder from the get_status() methodKevin O'Connor2019-11-241-0/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Remove support for lookahead() methodKevin O'Connor2019-11-211-4/+0
| | | | | | | Now that the extruder lookahead method is no longer used it can be removed from the toolhead and extruder classes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Add support for instantaneous corner velocityKevin O'Connor2019-11-211-22/+13
| | | | | | | Add mechanism to perform look-ahead between moves with different extrusion ratios. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Initial support for "smoothed pressure advance"Kevin O'Connor2019-11-211-90/+46
| | | | | | | Support averaging the extruder position over a time range to "smooth out" the velocity changes that occur during pressure advance. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Support step generation in lead up to and after stepper activityKevin O'Connor2019-11-211-2/+3
| | | | | | | | Add support for kinematic functions that calculate step times based on a range of the motion queue. This requires adding additional pause times when fully flushing the motion queue. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Rename _full_flush() to flush_step_generation() and use globallyKevin O'Connor2019-11-211-1/+1
| | | | | | | Update code that modifies the low-level kinematics handlers to first call toolhead.flush_step_generation(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* cartesian: Report dual_carriage_rails from get_steppers()Kevin O'Connor2019-11-151-3/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Add get/set_tag_position() and convert calc_position()Kevin O'Connor2019-11-136-15/+16
| | | | | | | | | Rename calc_position() to calc_tag_position() and have it calculate the value of the position from the last stepper set_tag_position() call. This enables the calc_tag_position() code to be more flexible as it can be run with arbitrary positions. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Remove explicit active extruder trackingKevin O'Connor2019-11-131-13/+4
| | | | | | | There's no need to have special logic in gcode.py to track the active extruder. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Remove add_to_endstop() methodKevin O'Connor2019-11-121-2/+4
| | | | | | | Now that the PrinterStepper and MCU_stepper classes have been merged, there is no need for the add_to_endstop() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: Move motor_off() logic to stepper_enable.pyKevin O'Connor2019-11-127-24/+12
| | | | | | | | Directly disable all the stepper motors on a global motor_off() from the StepperEnable() class in stepper_enable.py. This simplifies the toolhead and kinematic classes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Consistently use "extruder" for the primary extruderKevin O'Connor2019-11-071-7/+8
| | | | | | | | No longer allow the primary extruder to be named "extruder0". This avoids internal and external confusion between the printer objects and config section names. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Rename register_move_handler() to register_step_generator()Kevin O'Connor2019-11-076-8/+8
| | | | | | | Rename the function so it is more clear what the step generation code path is. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Treat extrude with Z only movement to be an "extrude only" moveKevin O'Connor2019-11-071-1/+1
| | | | | | | | Do not apply max_extrude_cross_section check, and do apply extrude_only_xxx checks to Z only moves that also extrude. Some printer start scripts will prime the extruder while moving the Z. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Calculate and store axes_r in move classKevin O'Connor2019-11-061-3/+3
| | | | | | | | Calculate the ratio of axis distance to total move distance (axis_d / move_d) and store in a new member variable axes_r. This avoids needing to recalculate the value in other code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Remove move_fill()Kevin O'Connor2019-11-061-6/+3
| | | | | | | Now that all callers use the trapq system to queue moves, it is no longer necessary to individually allocate and fill a 'struct move'. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>