5705 Commits

Author SHA1 Message Date
Kevin O'Connor
d40fd2190d gcode_move: Support additional toolhead axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
4c21e1d00f gcode_move: Internally track an axis_map to map gcode axis names
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
2082300309 z_thermal_adjust: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
53acdfd0a5 skew_correction: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
a537ae0ceb exclude_object: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
307c03e480 resonance_tester: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
64d6f110a9 bed_tilt: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
447908ce0c bed_mesh: Support toolhead positions with more than 4 axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
bb281834b0 toolhead: Initial support for adding extra axes to toolhead moves
Add a new add_extra_axes() to support adding additional axes.  Once
called, toolhead.get_position() will return a list object with more
than 4 items, and toolhead.move() requires the same size list.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
9dbfc76d9d force_move: No need to pass 4 parameters to toolhead.set_position()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
ae536b4786 toolhead: Only alter XYZ coordinates on set_position() calls
It's not valid to alter the extruder position from a call to
set_position(), so don't allow callers to attempt that.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
8928c394cf toolhead: Support unregister_step_generator() call
Allow both registering and unregistering step generation callbacks.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
01422da951 extruder: Remove update_move_time() call
The toolhead can obtain the underlying extruder trapq via
extruder.get_trapq().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
f06eeb5c7a extruder: Rename extruder.move() to extruder.process_move()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Dmitry Butyugin
ca83c13f37 generic_cartesian: Fixed safe_z_home and manual_probe for new kinematics
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-10 20:16:00 -04:00
Dmitry Butyugin
8627c94d6a
stepper: Fix broken manual_stepper rail naming (#6929)
The naming got broken during refactoring for generic_cartesian.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2025-05-10 20:10:54 -04:00
Kevin O'Connor
6f87a4e685 stepper: Minor code tweak - remove unneeded parenthesis
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-09 12:58:01 -04:00
Kevin O'Connor
b5aea5b774 stepper: Minor code reorg - remove unneeded HAVE_OPTIMIZED_PATH definition
Make it more clear that stepper_load_next() has three separate code
paths - one for each of the optimized stepper_event_X() functions.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-09 12:38:25 -04:00
Kevin O'Connor
fd55dd9e9d stepper: Also ensure minimum time after dir change and next step
In practice the host will not schedule any steps immediately after a
direction change (due to acceleration limits and the host
"step+dir+step filter").  However, there is also no harm in enforcing
a minimum duration in the mcu.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-09 09:52:05 -04:00
Kevin O'Connor
885f63cff0 stepper: Ensure minimum time between step pin and dir pin change
Commit 8faed8d9 made it possible to utilize stepper_event_full() while
utilizing tmc "step on both edges" optimation.  That commit would
ensure a minimum step pulse duration, but it did not ensure a minimum
duration between step pin and dir pin changes.  Commits 0d27195f and
554ae78d optimized the gpio handling on stm32h7 chips, which could
potentially cause a very small amount of time between step pin and dir
pin changes.

Enforce a minimum time after a step pin update before updating the dir
pin.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-09 09:52:05 -04:00
Kevin O'Connor
efabe63357 stepper: Move timer checks from stepper_event_full() to stepper_load_next()
This simplifies the stepper_event_full() and makes it easier to
implement more complex checks.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-09 09:52:05 -04:00
Kevin O'Connor
1dc9aa8e19 stepper: Free stepper_move struct near top of stepper_load_next()
Move up the freeing of the stepper_move struct and setting of
s->position in stepper_load_next().  This simplifies the code and
will make it easier to add more logic to this function.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-09 09:52:05 -04:00
Matszwe02
9aba1a8536 gcode_macro: more descriptive "unable to parse as a literal" error - display faulty command
Signed-off-by: Mateusz Szwedka <matszwe02@gmail.com>
2025-05-08 11:37:38 -04:00
JamesH1978
81277154d2
config: Update CR6-SE 2021 config with board revision (#6924)
As per #6923 this PR adds the fact that this config works for the late revision CR-ERA_V1.1.0.3 board as well.

Signed-off-by: James Hartley <james@hartleyns.com>
2025-05-08 11:36:04 -04:00
JamesH1978
d444289111
config: Update CR6-SE 2020 config with board revision (#6923)
It has been noted that there are 3 possible boards with 2 possible configs, which we have both of, but this one does not state that it is for the 4.5.2 early kickstarter version. Which was causing some confusion.

Signed-off-by: James Hartley <james@hartleyns.com>
2025-05-08 11:35:38 -04:00
Dmitry Butyugin
89ffbbed4c dual_carriage: Fixed broken safe_distance parameter
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2025-05-07 14:23:39 -04:00
Dmitry Butyugin
cc6736c3e3
kinematics: Generic Cartesian kinematics implementation (#6815)
* 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>
2025-05-06 18:06:36 -04:00
Kevin O'Connor
1cc6398074 klippy-requirements: Add comments to each of the requirements
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-02 13:52:20 -04:00
Eric Callahan
1e045e8ee0 build: add msgspec python requirement
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-05-02 12:19:13 -04:00
Eric Callahan
f7e33df99d webhooks: support msgspec json serialization
Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-05-02 12:19:13 -04:00
Kevin O'Connor
4504c0333f docs: Update stm32h723 benchmarks now that it runs at 520Mhz
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-02 12:06:59 -04:00
Kevin O'Connor
554ae78d8c stm32: Run stm32h723 at 520Mhz
Increase speed of stm32h723 chips from 400Mhz to 520Mhz.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-02 11:44:31 -04:00
Kevin O'Connor
ee79d0e307 stm32: Support over 400Mhz main clock in stm32h7_adc.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-02 11:44:31 -04:00
Kevin O'Connor
7b697105b3 stm32: Use 12Mhz nominal internal clock in stm32f0_i2c.c
Increase the internal nominal clock from 8Mhz to 12Mhz - this improves
support for higher chip frequencies.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-02 11:44:31 -04:00
Kevin O'Connor
3cf8899a5a docs: Note canbus_query.py limitations in CANBUS_Troubleshooting.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-29 13:52:57 -04:00
Kevin O'Connor
b7c243db19 docs: Note functioning canbus required even in bridge mode in CANBUS.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-29 13:02:34 -04:00
Kevin O'Connor
5b2f8104c7 neopixel: Round up in nsecs_to_ticks()
The rp2040 operates at a fast internal clock with a relatively slow
external timer and dividing down could result in a too small delay.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:55:30 -04:00
Kevin O'Connor
cf3bedfbdc stm32: Enable VOS0 power mode on stm32h723 if frequency above 400Mhz
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:55 -04:00
Kevin O'Connor
7f4f696f10 stm32: Don't try to set incorrect PWR->CR3 register on stm32h7
It's not valid to set BYPASS and LDOEN at the same time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:55 -04:00
Kevin O'Connor
9c37a918db stm32: Set the PLL frequency equal to CONFIG_CLOCK_FREQ on stm32h723
There is no reason to use a higher internal PLL frequency.  This
change also makes it possible to enable higher clock frequencies on
the stm32h723.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:55 -04:00
Kevin O'Connor
f2b68fef73 stm32: Avoid read-modify-write register updates in stm32h7 clock_setup()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:55 -04:00
Kevin O'Connor
c352617c30 stm32: Use enable_pclock() in stm32h7 clock_setup()
Use the helper functions to enable the peripheral clock instead of
directly manipulating the clock enable bits.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:55 -04:00
Kevin O'Connor
5d1f773ffb stm32h7: Always clear AHB1ENR at startup on stm32h7
Entirely clear the AHB1ENR register.  There is no need to modify
AHB1LPENR.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:55 -04:00
Kevin O'Connor
da8e0a6e50 docs: Update date of cycle_time change in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:36:12 -04:00
Kevin O'Connor
42faa962fc mcu: Decrease mcu.max_nominal_duration() to 3 seconds from 5
This allows the mcu to utilize faster internal speeds.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:28:52 -04:00
Kevin O'Connor
0f94f6c8e3 heaters: Confirm heater setting in mcu every 3 seconds instead of 5
Increase the confirmation rate of heater enable settings.  This allows
the mcu to utilize faster internal speeds.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:28:52 -04:00
Kevin O'Connor
c917bd893d pwm_tool: Use mcu.min_schedule_time() and mcu.max_nominal_duration()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:28:52 -04:00
Kevin O'Connor
d57bc253c5 led: Use mcu.min_schedule_time() and mcu.max_nominal_duration()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:28:52 -04:00
Kevin O'Connor
0dce120a20 pwm_cycle_time: Use mcu.min_schedule_time() and mcu.max_nominal_duration()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:28:52 -04:00
Kevin O'Connor
ab61b0a435 output_pin: Use mcu.min_schedule_time() and mcu.max_nominal_duration()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-28 19:28:52 -04:00