Commit graph

5754 commits

Author SHA1 Message Date
Kevin O'Connor
9346ad1914 load_cell_probe: Fix warnings on avr builds
Some checks failed
Build test / build (push) Has been cancelled
On AVR, integers are 16bit, so be sure to promote math to 32bit where
needed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-18 11:09:58 -04:00
jimmyjon711
0e52f03b5b
stm32: Adding more hardware pwm capable pins for STM32Hx series chips (#6965)
Signed-off-by: Jim Madill <jcmadill1@gmail.com>
2025-06-18 11:05:17 -04:00
Kevin O'Connor
f54b7b9376 sos_filter: Fix validate_section_index() check
Some checks failed
Build test / build (push) Has been cancelled
A section_idx equal to max_sections is also invalid.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-11 17:59:02 -04:00
Kevin O'Connor
5666b88c69 ar100: Convert to or1k-elf toolchain
Some checks are pending
Build test / build (push) Waiting to run
The more.musl.cc site is blocking downloads from all github actions,
which makes it difficult to use that site for the ar100 cross build
toolchain.  Convert to the openrisc or1k-elf toolchain as a
replacement.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-08 14:15:50 -04:00
Kevin O'Connor
889be5b275 docs: Fix typo in Benchmarks.md
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-08 12:23:02 -04:00
Timofey Titovets
607d0b4237 input_shaper: fix printer obj reference
Some checks failed
Build test / build (push) Has been cancelled
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-06-06 15:43:29 -04:00
Kevin O'Connor
d120a313b7 docs: Note 'config' object shouldn't be accessed after initial load
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
Update Code_Overview.md to note that the config object should not be
stored after the "config loading phase".

Remove a few inadvertent cases where a 'config' object was stored
in module member variables.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-04 13:46:28 -04:00
Dmitry Butyugin
4d4b9684a5 input_shaper: Track kinematics updates by dual_carriage
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2025-06-04 13:40:58 -04:00
Kevin O'Connor
14cbb8dd2d rp2040: Prefer larger postdiv1 on rp2040 chips
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
The rp2040 uses a pll vco divider of 6.  Prefer setting postdiv1=6 and
postdiv2=1 (instead of the previous postdiv1=3 and postdiv2=2).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-02 14:10:42 -04:00
Kevin O'Connor
aa3388cc59 klippy-requirements: Update setuptools revision to 78.1.1
A security vulnerability was found in setuptools - increase package
dependency to fixed version.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-02 13:31:17 -04:00
Timofey Titovets
d6902240dd htu21: fix crash on unknown dev id
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-06-02 13:17:41 -04:00
Kevin O'Connor
105ce35e1b stm32: Add comments on PLL frequency requirements to clock setup code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-02 13:15:53 -04:00
Kevin O'Connor
c0ca4c5cc7 docs: Update benchmarks with stm32g431 chip
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-06-02 13:15:48 -04:00
Kevin O'Connor
cfa48fe39f stm32: Run stm32g431 at 170Mhz
The chip supports 170Mhz, so no need to run at 150Mhz.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-31 15:20:12 -04:00
Ingo Donasch
2dd73d0431
print_stats: Fix for filament statistics bug in print_stats.py for toolchangers (#6946)
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
added extruder:activate_extruder event hook to print_stats.py to update self.last_epos

Signed-off-by: Ingo Donasch <ingo@donasch.net>
2025-05-31 13:06:44 -04:00
Kevin O'Connor
d25602e88d docs: Update CAN bus command rate benchmarks
Add a benchmark for the rp2350 device when running via CAN bus.
Remove the old stm32f042 CAN bus benchmark as that test predates a
number of importnat CAN bus code changes and is likely no longer
accurate.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-31 12:24:40 -04:00
Kevin O'Connor
1f3b4cc749 stm32: Fix spi overflow issue on stm32h7
Some checks are pending
Build test / build (push) Waiting to run
Completely filling the spi transmit fifo could lead to a situation
where the rx fifo overflows.  Make sure not to write past the rx fifo
size.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-30 20:36:09 -04:00
Kevin O'Connor
8e58f8fb39 rp2040: Fix spi overflow issue
Completely filling the spi transmit fifo could lead to a situation
where the rx fifo overflows.  Make sure not to write past the rx fifo
size.

Also, be sure to wait for the transmission to fully complete before
exiting spi_transfer().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-30 16:34:49 -04:00
Timofey Titovets
f4130aa948 rp2040: spi - enable fifo
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-05-30 15:18:07 -04:00
Kevin O'Connor
de182b1d14 stm32: Support using CANBUS on PB5/PB6 on stm32h7 chips
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-30 15:15:13 -04:00
Kevin O'Connor
f5956b5395 stm32: Simplify Kconfig HAVE_STM32_CANBUS checks
Avoid unnecessary (HAVE_STM32_CANBUS && MACH_STM32xx) checks in
Kconfig.  The HAVE_STM32_CANBUS is a helper symbol for all the chips
that support canbus, there's no need to mix it with a check for a chip
that is already known to have canbus.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-30 15:15:13 -04:00
Kevin O'Connor
8d7e487149 sos_filter: Improve error checking on section_idx
Some checks failed
Build test / build (push) Waiting to run
klipper3d deploy / deploy (push) Has been cancelled
Validate host provided index prior to accessing memory using that
index.

Also, consistently use a uint8_t for max_sections (to account for
integer overflow issues).

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-29 19:30:45 -04:00
Kevin O'Connor
eb43b20e3b load_cell_probe: Avoid peeking directly at config.section member variable
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-29 19:17:45 -04:00
Gareth Farrington
388fe1b23f docs: Load Cell Probe Documentation
Add documentation updates for Homing & Probing with load cell probe

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:11:05 -04:00
Gareth Farrington
f6d878a898 filter_workbench: Add Filter Workbench
Add a filter workbench Jupiter notebook to help printer developers tune filters based on probing data

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:10:51 -04:00
Gareth Farrington
b3e894f241 load_cell_probe: Create LoadCellProbe
Initial setup of Load Cell Probing. This implementation supports triggering from the Load Cell Probe on the MCU. It also supports, optiopnal, filtering of the force signal by sos filter to eliminate drift caused by bowden tubes or other mechanical causes.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:10:21 -04:00
Gareth Farrington
3dbac01e1d probe: Create ProbeVirtualEndstopDeprecation
As probes stop supporting `probe:z_virtual_endstop` this class will give users a polite and specific configuration error.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:08:32 -04:00
Gareth Farrington
69507a0354 sensor_hx71x: Update Sensors to report to load_cell_probe
Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:07:49 -04:00
Gareth Farrington
42c9031c81 load_cell_probe: Create load_cell_probe MCU object
Implement MCU features that enable using an adc to stop an axis

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:06:48 -04:00
Gareth Farrington
cb0c38f7d8 sos_filter: Second Order Sections MCU Filter
This is an implementation of the SOS fliltering algorithm that runs on the MCU.

The filter opperates on data in fixed point format to avoid use of the FPU as klipper does not support FPU usage.

This host object handles duties of initalizing and resetting the filter so client dont have to declare their own commands for these opperations. Clients can select how many integer bits they want to use for both the filter coefficients and the filters output value. An arbitrary number of filter sections can be configured. Filters can be designed on the fly with the SciPy library or loaded from another source.

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-05-29 19:01:38 -04:00
Timofey Titovets
0181023954 lis2dw: if spi is used - disable i2c
Some checks failed
Build test / build (push) Has been cancelled
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-05-26 18:44:29 -04:00
Timofey Titovets
07b3726d31 stm32: h7 spi - add a delay on SCK polarity change
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-05-26 18:44:29 -04:00
Timofey Titovets
28a4baf95c spi_software: add a delay on mode change
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-05-26 18:44:29 -04:00
Timofey Titovets
14685bf77f rp2040: add a delay on SCK polarity change
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-05-26 18:44:29 -04:00
Dmitry Butyugin
b1011e3fb1 dual_carriage: Fixed input shaper stepper kinematics initialization
Some checks failed
Build test / build (push) Has been cancelled
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2025-05-22 14:44:09 -04:00
Kevin O'Connor
17b8ce4c6b docs: Remove SHAPER_CALIBRATE and usb-to-canbus bridge warning in CANBUS.md
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
There have been several optimization to the usb to canbus bridge code
since that statement and it is likely many setups can run a
SHAPER_CALIBRATE with all activity on a single 1mbit canbus.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-19 12:54:26 -04:00
Kevin O'Connor
9090377bbc stm32: Allow stm32g4 chips to select a bootloader
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-19 12:31:46 -04:00
JamesH1978
2d4589949c
docs: Update Installation.md - Flash loop protection (#6935)
Added a paragraph about flash loop protection on some motherboards. It has been noted that not all people know about the need to change the bin filename on some stock boards or other methods that may hinder progress.

Signed-off-by: James Hartley <james@hartleyns.com>
2025-05-19 12:30:39 -04:00
Timofey Titovets
8c01be8c75
stm32: spi enable fifo if supported (#6936)
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-19 12:24:29 -04:00
Timofey Titovets
3a015cd00d stm32: H7 spi enable use of fifo
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-05-19 12:21:33 -04:00
Kevin O'Connor
841a9ca2f7 stm32: Avoid read-modify-write register access in stm32h7_spi.c
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-16 12:26:52 -04:00
Kevin O'Connor
fe9eff8ce3 docs: Fix index.md links
Use relative links in index.md and correct the location of the COPYING
file.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-16 12:14:45 -04:00
Rowland
82f540bb73
docs: BED_MESH_CALIBRATE makes a mesh that is immediately available. (#6919)
Some checks failed
Build test / build (push) Has been cancelled
klipper3d deploy / deploy (push) Has been cancelled
The docs aren't particularly clear that if you generate a mesh in our start g-code, you can just use it without additional commands. This is causing issues with support on r/klippers

Signed-off-by: Rowland Straylight <rowlandstraylight@gmail.com>
2025-05-14 13:53:10 -04:00
Kevin O'Connor
ed36041b67 resonance_tester: Fix typo
Some checks failed
Build test / build (push) Has been cancelled
Fix typo introduced in 307c03e48.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-13 11:14:30 -04:00
Kevin O'Connor
1af219fad6 klippy_requirements: Update dependencies to support Python v3.13
Some checks failed
Build test / build (push) Waiting to run
klipper3d deploy / deploy (push) Has been cancelled
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 21:51:53 -04:00
Kevin O'Connor
6c1d5d912a manual_stepper: Support LIMIT_VELOCITY and LIMIT_ACCEL when using gcode axis
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
ee0bc3d697 manual_stepper: Support position_min and position_max options
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
64e01f03a2 manual_stepper: Support INSTANTANEOUS_CORNER_VELOCITY on gcode axes
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-05-12 20:15:03 -04:00
Kevin O'Connor
7201f41664 manual_stepper: Support registering as an additional axis
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>
2025-05-12 20:15:03 -04:00
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