aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/kinematics/extruder.py
Commit message (Collapse)AuthorAgeFilesLines
* 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-041-3/+3
| | | | | | | 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-031-2/+1
| | | | | | | 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>
* 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>
* 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>
* 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>
* 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 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>
* 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_enable: Move motor_off() logic to stepper_enable.pyKevin O'Connor2019-11-121-4/+0
| | | | | | | | 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-071-2/+2
| | | | | | | 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>
* extruder: Convert step generation to use trapq systemKevin O'Connor2019-11-061-7/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Use template evaluation on gcodeKevin O'Connor2019-06-071-4/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: add get_status methodJanar Sööt2019-06-041-0/+6
| | | | Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* gcode: Change respond_info() to log by defaultKevin O'Connor2019-03-041-1/+1
| | | | | | | It makes sense to log most respond_info() content, so do that by default. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Wrap code to 80 columnsKevin O'Connor2019-02-271-3/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: take a gcode_id when setting up a heater (#1028)john--2019-01-021-4/+5
| | | | | Allow an arbitrary gcode_id to be supplied during heater setup. This allows future extras to register additional IDs beyond B, and T#. Signed-off-by: John Jardine <john@gprime.net>
* extruder: Don't use max_extrude_cross_section in max_extrude_only defaultsKevin O'Connor2018-10-251-4/+5
| | | | | | | | | | Some users increase max_extrude_cross_section to avoid issues with some slicers. However, increasing that value also increases the defaults for the max_extrude_only parameters which is not obvious. Base the max_extrude_only defaults only on the configured nozzle diameter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Enhance itersolve stepper kinematics allocationKevin O'Connor2018-07-131-2/+1
| | | | | | | Allocate the stepper_kinematics directly in mcu.py - that way the kinematic classes don't have to interact with the chelper code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Move kinematic modules to new kinematics/ directoryKevin O'Connor2018-07-121-0/+253
Move extruder.py, cartesian.py, corexy.py, and delta.py to a new kinematics/ sub-directory. This is intended to make adding new kinematics a little easier. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>