aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/chelper/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* Isort all klippy codeTomasz Kramkowski2025-08-151-2/+3
|
* Use makefiles instead of auto-buildingTomasz Kramkowski2025-08-151-20/+2
|
* Run black on all first party python codeTomasz Kramkowski2025-08-061-25/+70
|
* klippy: fix typos in python code (#6989)Thijs Triemstra2025-07-251-1/+1
| | | Signed-off-by: Thijs Triemstra <info@collab.nl>
* input_shaper: Track kinematics updates by dual_carriageDmitry Butyugin2025-06-041-0/+1
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* kinematics: Generic Cartesian kinematics implementation (#6815)Dmitry Butyugin2025-05-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* extruder: Allow dynamic adjustment of pressure advance (#6635)Dmitry Butyugin2024-07-111-1/+2
| | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* toolhead: Keep stepcompress move history relative to current time (#6439)Francois Chagnon2023-12-301-2/+4
| | | | | Expire history relative to current time rather than last move in history queue Signed-off-by: Francois Chagnon <fc@francoischagnon.net>
* stepcompress: Add support for queuing messages that consume move queue spaceKevin O'Connor2023-11-161-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* idex_modes: COPY and MIRROR mode implementation (#6297)Dmitry Butyugin2023-08-011-3/+10
| | | | | | | | | | | COPY and MIRROR mode implementation Correctly apply input shaper params to new dual_carriage Added SAVE_/RESTORE_IDEX_STATE commands Documentation updates for the new IDEX modes Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* input_shaper: Fixed tracking of step_generation_scan_timeDmitry Butyugin2023-06-061-2/+2
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* chelper: Minor declaration movement in __init__.pyKevin O'Connor2023-01-071-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: Add deltesian printers (#5743)Tircown2022-09-011-4/+9
| | | | | Initial push of the working deltesian kinematics after some successful tests. Signed-off-by: Fabrice GALLET <tircown@gmail.com>
* serialqueue: Improve canbus timingKevin O'Connor2022-07-291-2/+2
| | | | | | | Adjust timing based on the minimum transmission time of canbus messages. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Add support for reversing the direction of extruder stepper movementKevin O'Connor2022-02-101-2/+3
| | | | | | | Extend SET_EXTRUDER_ROTATION_DISTANCE to support reversing the direction of extruder movement. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Don't store pressure_advance value in trapq movesKevin O'Connor2022-01-161-2/+2
| | | | | | | | | Store the pressure_advance value in "struct extruder_stepper" instead of in the trapq's "struct move". This makes it possible for multiple stepper motors to have different pressure advance values while still using the same trapq. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* input_shaper: Factored out AxisInputShaper classDmitry Butyugin2021-10-261-3/+2
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* input_shaper: Define input shapers in a single place in Python codeDmitry Butyugin2021-10-261-14/+4
| | | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* stepcompress: Pass clock to stepcompress_set_last_position()Kevin O'Connor2021-08-061-1/+1
| | | | | | | | | Using sc->last_step_clock for the last position marker does not work properly, because the stepper.py code calls stepcompress_reset() prior to calling stepcompress_set_last_position(). Fix by passing an explicit clock to stepcompress_set_last_position(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Support extracting stepcompress historyKevin O'Connor2021-07-291-0/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Store toolhead.set_position() updates in trapq historyKevin O'Connor2021-07-291-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Keep history of recent trapq movesKevin O'Connor2021-07-291-0/+9
| | | | | | | Store trapq moves in a separate "history" list after each move is nominally expired. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Rename trapq_free_moves() to trapq_finalize_moves()Kevin O'Connor2021-07-291-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kinematics: Add dual_carriage to hybrid-corexyz (#4296)Tircown2021-06-271-0/+1
| | | | | | | - Add dual_carriage abilities for hybrid-corexy and hybrid-corexz - Introduce the module idex_mode - Fix add_stepper to the correct rail in hybrid-corexy Signed-off-by: Fabrice GALLET <tircown@gmail.com>
* trdispatch: Support fast responses to trsync_state messagesKevin O'Connor2021-06-091-4/+18
| | | | | | | Add C code that can process trsync_state messages and dispatch responses with low-latency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgblock: Add clock estimation helper functionsKevin O'Connor2021-06-091-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgblock: Move message manipulation code from serialqueue.c to new msgblock.cKevin O'Connor2021-06-091-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pollreactor: Move C pollreactor code from serialqueue.c to its own fileKevin O'Connor2021-06-091-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stepcompress: Add support for tracking history of queue_step commandsKevin O'Connor2021-03-131-0/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* serialqueue: Support sending messages over a CAN busKevin O'Connor2021-03-131-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Move logging_callback() to global scopeKevin O'Connor2021-03-011-4/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buildcommands: Extend number of available mcu messages from 96 to 128Kevin O'Connor2021-02-181-3/+3
| | | | | | | | | | | Some internal code treats the message ids as encoded "variable length quantities", while other internal code assumes the message id is always one byte long. Continue using this scheme, but convert the VLQ users to use the name "msgtag" while the 1-byte users use "msgid". Increase the number of available msgids from 96 to 127 - the higher values get encoded as negative "msgtags". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Fix check for failed code buildKevin O'Connor2021-02-071-2/+11
| | | | | | | Commit 73b78af6 inadvertently removed the check for a successful gcc compilation. Add the check back in. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Use standard C type definition for pyhelper_logging_callbackKevin O'Connor2020-09-261-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Rework check for building C codeKevin O'Connor2020-09-261-22/+26
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Set compiler flags to never use "x387" floating point mathKevin O'Connor2020-09-151-7/+18
| | | | | | | | | The default on X86 32bit machines is to use 80bit floating point math (as found in the ancient "387 coprocessor"). This can cause numerical stability problems. Set the compiler flags to make sure the newer SSE math is always used on X86. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* corexz: Add CoreXZ kinematics (#3129)Voron2020-07-301-7/+11
| | | | | Add a CoreXZ kinematics Signed-off-by: Maks Zolin <mzolin@vorondesign.com>
* input_shaper: Initial support of input shaping (#3032)Dmitry Butyugin2020-07-051-2/+24
| | | | | | Input shaping can help to reduce printer vibrations due to resonances and eliminate or reduce ghosting in prints. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* serialqueue: Support notification of when a command is processedKevin O'Connor2020-02-201-1/+3
| | | | | | | | | Add ability for the host code to get a notification when the ack for a command sent to the micro-controller is received. This is in preparation for improved detection of message loss between mcu and host. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Add ability to query the active_flags stateKevin O'Connor2020-01-231-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* rotary_delta: Initial support for rotary delta kinematicsKevin O'Connor2020-01-061-2/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* itersolve: Export itersolve_calc_position_from_coord()Kevin O'Connor2020-01-061-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* kin_extruder: Apply pressure advance in kin_extruder.cKevin O'Connor2019-12-081-2/+2
| | | | | | | | 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>
* extruder: Initial support for "smoothed pressure advance"Kevin O'Connor2019-11-211-4/+2
| | | | | | | 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>
* stepper: Remove set_commanded_position() callKevin O'Connor2019-11-131-2/+1
| | | | | | | | Now that the only caller to set_commanded_position() is set_position(), remove the set_commanded_position() method and pass the set_position() call directly to the itersolve.c code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* chelper: Report an error if the C host code does not compileKevin O'Connor2019-11-071-1/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Calculate and store axes_r in move classKevin O'Connor2019-11-061-1/+1
| | | | | | | | 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: Use separate 'move' entries for accel, cruise, and decel phasesKevin O'Connor2019-11-061-1/+1
| | | | | | | | Only track a single acceleration movement in a 'struct move' instance. Break the classic trapezoid movement (accel, cruise, decel) into three separate movements. This simplifies the calculation logic. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* trapq: Remove move_fill()Kevin O'Connor2019-11-061-4/+2
| | | | | | | 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>
* itersolve: Remove unused gen_steps()Kevin O'Connor2019-11-061-1/+0
| | | | | | | Eliminate the old gen_steps() call now that all callers have been converted to the newer trapq based generate_steps(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>