aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/manual_stepper.py
Commit message (Collapse)AuthorAgeFilesLines
* Isort all klippy codeTomasz Kramkowski2025-08-151-1/+4
|
* Run black on all first party python codeTomasz Kramkowski2025-08-061-73/+132
|
* manual_stepper: Support LIMIT_VELOCITY and LIMIT_ACCEL when using gcode axisKevin O'Connor2025-05-121-2/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Support position_min and position_max optionsKevin O'Connor2025-05-121-2/+12
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Support INSTANTANEOUS_CORNER_VELOCITY on gcode axesKevin O'Connor2025-05-121-1/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Support registering as an additional axisKevin O'Connor2025-05-121-1/+56
| | | | | | | Add a new G-Code command that can register a manual_stepper as an additional axis on standard G-Code G1 commands. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: Generic Cartesian kinematics implementation (#6815)Dmitry Butyugin2025-05-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tests: Added a regression test for generic_cartesian kinematics * kinematics: An intial implementation of generic_cartesian kinematics * generic_cartesian: Refactored kinematics configuration API * generic_cartesian: Use stepper instead of kinematic_stepper in configs * generic_cartesian: Added SET_STEPPER_KINEMATICS command * generic_cartesian: Fixed parsing of section names * docs: Generic Caretsian kinematics documentation and config samples * generic_cartesian: Implemented multi-mcu homing validation * generic_cartesian: Fixed typos in docs, minor fixes * generic_cartesian: Renamed `kinematics` option to `carriages` * generic_cartesian: Moved kinematic_stepper.py file * idex_modes: Internal refactoring of handling dual carriages * stepper: Refactored the code to not store a reference to config object * config: Updated example-generic-cartesian config * generic_cartesian: Restricted SET_STEPPER_CARRIAGES and exported status * idex_modes: Fixed handling stepper kinematics with input shaper enabled * config: Updated configs and tests for SET_DUAL_CARRIAGE new params * generic_cartesian: Avoid inheritance in the added classes Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* manual_stepper: Implement "drip moves" for manual stepper STOP_ON_ENDSTOPKevin O'Connor2025-04-181-5/+19
| | | | | | | | | | | | | Currently, `MANUAL_STEPPER STOP_ON_ENDSTOP=1` type commands will move until hitting the endstop, but it will still always consume the total amount of move time. That is, following moves can't be started until the total possible time of the homing move is completed. Implement "drip moves" so that the code only schedules the movement in small segments. This allows following movements to be scheduled without a significant delay. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Pass set_position() homing_axes parameter as a stringKevin O'Connor2025-01-211-1/+1
| | | | | | | | Use strings such as "xyz" to specify which axes are to be considered homing during a set_position() call. This makes the parameter a little less cryptic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Revert "manual_stepper: Add basic status. (#6527)"Kevin O'Connor2024-04-101-5/+0
| | | | | | | | | This reverts commit b029d0466841b90b54279500f70a92deacfd6c5a. The MCU_Stepper class does not have a is_motor_enabled() method, so the change above results in an internal exception. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Add basic status. (#6527)Viesturs Zariņš2024-04-041-0/+5
| | | | | Adding position and enabled in manual_stepper status. Enabled is already available through stepper_enable object. But this makes it more straightforward to access it. Signed-off-by: Viesturs Zarins <viesturz@gmail.com>
* toolhead: Rename note_kinematic_activity() to note_mcu_movequeue_activity()Kevin O'Connor2024-01-181-1/+1
| | | | | | Rename this function to make it more clear why it is called. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Keep stepcompress move history relative to current time (#6439)Francois Chagnon2023-12-301-1/+2
| | | | | Expire history relative to current time rather than last move in history queue Signed-off-by: Francois Chagnon <fc@francoischagnon.net>
* kinematics: Convert to Python3 string encodingKevin O'Connor2021-10-011-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Add missing calc_position() wrapper callKevin O'Connor2021-08-261-0/+2
| | | | | | | Commit 3814a132 added code to homing.py to call calc_position() - add that function to manual_stepper.py . Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Rename trapq_free_moves() to trapq_finalize_moves()Kevin O'Connor2021-07-291-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Do not set min_stop_interval in micro-controllerKevin O'Connor2021-04-301-1/+0
| | | | | | | | The min_stop_interval safety check is fragile and leads to a notable amount of complexity. Avoid these issues by not programming this safety check. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Move homing logic from manual_stepper.py to homing.pyKevin O'Connor2021-03-291-35/+25
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Prefer printer.command_error() instead of homing.CommandError()Kevin O'Connor2020-09-041-2/+2
| | | | | | | 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>
* extras: Use "from . import module" for relative importsKevin O'Connor2020-06-151-1/+2
| | | | | | Use alternate import syntax to improve Python3 compatibility. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-18/+20
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Allow manual_stepper to run in parallel than an other stepperJeremy Briffaut2020-03-231-3/+7
| | | | | Signed-off-by: Jeremy Briffaut <kakou@kakou.org> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Fix sensorless endstop for manual_stepper (#2621)kakou-fr2020-03-201-0/+11
| | | Signed-off-by: Jeremy Briffaut <kakou@kakou.org>
* manual_stepper: Support ignoring errors on STOP_ON_ENDSTOPKevin O'Connor2020-02-191-3/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Don't raise a TimeoutError from home_wait()Kevin O'Connor2020-02-191-5/+3
| | | | | | | Change home_wait() to return if the homing operation completed succesfully or not. This simplifies the callers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Merge home_prepare()/home_finalize() into move_begin/move_end eventsKevin O'Connor2020-02-151-10/+1
| | | | | | | | Collapse the "homing:move_begin", "homing:move_end", home_prepare(), and home_finalize() into two new events: "homing:homing_move_begin" and "homing:homing_move_end". This simplifies the homing code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* force_move: Make sure to flush step generation queue after each moveKevin O'Connor2019-11-241-2/+4
| | | | | | | Add toolhead.note_kinematic_activity() call and use it to force the step generation to be flushed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper: Move MCU_stepper from mcu.py to stepper.pyKevin O'Connor2019-11-121-2/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepper_enable: Move enable tracking from stepper.py to stepper_enable.pyKevin O'Connor2019-11-121-10/+18
| | | | | | | Move the enable line tracking out of the main stepper.py code. This simplifies the main kinematic code. 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>
* toolhead: Calculate and store axes_r in move classKevin O'Connor2019-11-061-2/+2
| | | | | | | | 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-8/+5
| | | | | | | 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>
* manual_stepper: Convert step generation to use trapq systemKevin O'Connor2019-11-061-5/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Catch the more generic CommandError during homingKevin O'Connor2019-06-061-2/+2
| | | | | | | Allow the low-level homing code to raise either a gcode.error or an EndstopError during a fault. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Add support for moves with accelerationKevin O'Connor2019-03-031-12/+17
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Add an "extras" module for manually controlling a stepperKevin O'Connor2019-02-121-0/+117
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>