5576 Commits

Author SHA1 Message Date
XiaoK
52617455ce
ldc_1612: Supports configurable external crystal frequency (#6734)
You can use the 40Mhz crystal oscillator recommended by TI official manual to get the best performance.
refer to: [ldc1612.pdf](https://www.ti.com/cn/lit/ds/symlink/ldc1612.pdf) 7.3.4

Signed-off-by: Xiaokui Zhao <xiaok@zxkxzk.cn>
2025-03-29 21:53:52 -04:00
FrY Sennberg
d679f711eb
stm32: Added PH13/14 CAN pin option for stm32h743 (#6857)
Added the option to select PH13/PH14 as CAN pins.

Signed-off-by:  Christoph Frei <fryakatkop@gmail.com>
2025-03-27 19:25:26 -04:00
Timofey Titovets
68dbbc8d41 rp2040: define spi bus on pins 12,11,10
Mellow FLY SHT36 Pro toolboard uses those pins

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-03-25 18:53:46 -04:00
Kevin O'Connor
59ebdce605 output_pin: Fix handling of template rendering errors
Make sure to assign 'value' on a rendering error to avoid an internal
error.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-03-25 18:46:38 -04:00
Kevin O'Connor
310747a636 fan_generic: Fix handling of template rendering errors
Make sure to assign 'value' on a rendering error to avoid an internal
error.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-03-25 18:45:12 -04:00
Kevin O'Connor
a3b4b39ff1 config: Add LED definitions to generic-bigtreetech-skr-mini-mz.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-03-24 17:43:41 -04:00
Pedro Lamas
fb91aad583 buttons: fixes incorrect parameters
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2025-03-21 13:36:27 -04:00
Kevin O'Connor
825d4baf90 stepper: Support disabling optimized "step on both edges" in "make menuconfig"
Add a new "low level option" to allow users to configure if they want
to optimize for Trinamic drivers or traditional stepper motor drivers.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-03-20 19:56:55 -04:00
Kevin O'Connor
8faed8d9fe stepper: Support step on both edges with custom minimum pulse duration
Add support for "step on both edges" to the main stepper_event_full()
code.  This makes that mode of operation available even when the
micro-controller is not compiled for "optimized step on both edges".
It also enables the custom pulse duration support (step_pulse_ticks)
when in "step on both edges" mode.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-03-20 19:56:55 -04:00
Gareth Farrington
272e815522
buttons: Debounce gcode_button and filament_switch_sensor (#6848)
Add `debounce_delay` config option which sets the debounce time, defaults to 0

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-03-20 19:55:33 -04:00
Gareth Farrington
06d65ef5ac
load_cell: Load cell gram scale (#6729)
* Add gram scale features to load_cell
* Convert sensor counts to grams and make this available via unix socket and object status
* Basic GCodes for tearing and reading the load cell
* Guided Calibration
* Diagnostic gcode to check the health of the load cell
* Update load_cell Documentation
* Add API server load_cell/dump_force endpoint
* Update [load_cell] config with calibration fields
* Add G-Code commands for working with load cells
* Add status reference for load_cell objects

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2025-03-20 19:53:44 -04:00
Philippe Daouadi
d886c1761b axis_twist_compensation: allow compensating both axis at once
Restores the behavior before #6739 since people seemed to rely on it,
even if the math is not exact.

Signed-off-by: Philippe Daouadi <philippe@ud2.org>
2025-03-12 18:29:20 -04:00
Dmitry Butyugin
47aa28e530 input_shaper: Fix for polar kinematics
Forward post_cb calls from itersolve to the original kinematics.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2025-03-11 19:15:23 -04:00
Kevin O'Connor
fbd5b49215 docs: Note AXIS_TWIST_COMPENSATION_CALIBRATE AUTO removal in Config_Changes.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-03-08 22:28:13 -05:00
yochiwarez
dad2196776 axis_twist_compensation: Remove the auto parameter
from axis_twist_compensation

Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
2025-03-08 22:23:35 -05:00
Timofey Titovets
b50d740542
gcode_macro: Expand template syntax errors (#6839)
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-03-07 18:32:31 -05:00
Marius Petcu
3e7efe5ef1 stm32: Add support for USART6 on STM32F401
STM32F401 has USART6 on PA12/PA11 and PC7/PC6 with alternate
function mapping AF08. This can be used, for example, to connect
to the Elegoo Neptune 3, where PA12/PA11 are wired to an RJ10 plug
going to the stock screen.

Signed-off-by: Marius Petcu <marius@petcu.me>
2025-03-07 17:52:46 -05:00
Paul Hansel
75a10bfcaf
icm20948: Add support for ICM20948 accelerometer (#6756)
Signed-off-by: Paul Hansel <github@paulhansel.com>
2025-03-04 17:12:26 -05:00
Thijs Triemstra
730e5951bc
docs: fix markup in Axis_Twist_Compensation.md (#6827)
Signed-off-by: Thijs Triemstra <info@collab.nl>
2025-02-28 19:38:38 -05:00
Kevin O'Connor
941fb5a367 usb_canbus: Send echo frame before processing the frame
The Linux kernel reports a canbus message as transmitted when it gets
the echo frame back.  Processing the message prior to sending the echo
frame can lead to odd looking debugging logs (as the response messages
may appear to predate the request messages).  This doesn't impact the
Klipper code, but it does make analyzing logs harder.  Fix by sending
the echo frame prior to processing the frame.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-27 13:24:19 -05:00
Kevin O'Connor
17d471c07c usb_canbus: Minor code cleanup - add new drain_host_queue() helper
Separate code in usbcan_task() to new drain_host_queue().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-27 13:24:19 -05:00
Kevin O'Connor
ef1d8bc3bd usb_canbus: Minor code cleanup - code movement and comment updates
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-27 13:24:19 -05:00
Kevin O'Connor
581c954f40 usb_canbus: Wake usbcan_task when sending from canbus_send
Don't limit the canbus_notify_tx() wakeup to cases where notify_local
is set - perform the wakeup whenever the host_status field indicates
the main task has work pending.

This fixes a small race condition where the main task could block
sending a usb echo frame, and the canbus_send() code gets called as
the usb bandwidth becomes available but before a usb wakeup
notification is sent.  In that situation, the usb code may not issue a
wake event and the echo frames may be delayed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-27 13:24:19 -05:00
GofranChang
98068beca0
skew_correction: Supports retrieving the name of the currently loaded skew correction … (#6821)
Signed-off-by: Zhang Gaofan <zhanggaofan0827@gmail.com>
2025-02-27 13:18:59 -05:00
Kevin O'Connor
3c1bf4ccfe test: Add rp2350 build to test cases
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-26 20:28:50 -05:00
Kevin O'Connor
1836ec431c docs: Update benchmarks for rp2040
Update benchmarks now that the rp2040 runs at 200Mhz.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-26 20:25:18 -05:00
Kevin O'Connor
14c105b86e rp2040: Fix build of rp2350
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-26 20:24:22 -05:00
Timofey Titovets
2f6d240900 rp2040: set clock to 200Mhz
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-02-26 20:11:17 -05:00
Eric Callahan
edc3d34beb bed_mesh: reduce generated point logging
With the introduction of "scanning" probes it has
become common for configurations to generate a large
number of points.  This can overwhelm both the log and
the pty when new points are generated.

This patch limits the initial points logged to 50.  In
addition points are no longer logged or pushed over
the pty when the mesh configuration changes.

Signed-off-by:  Eric Callahan <arksine.code@gmail.com>
2025-02-26 18:48:33 -05:00
Wulfsta
53f1bf2af2 sensor_lis2dw: remove commented code and fix formatting
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2025-02-26 15:17:31 -05:00
Kevin O'Connor
1fc6d214f4 stm32: Add support for stm32f070x6 mcus
This mcu has smaller memory and may require remapping of PA11/PA12.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-16 13:57:59 -05:00
Kevin O'Connor
bf5c4daf86 usb_cdc: Avoid ending a transmission with a max size usb packet
It seems the Linux kernel will consider a maximum size usb packet to
be a transaction that will continue into the next usb packet.  It will
thus hold on to the traffic from the first packet until it gets the
next packet.  However, if the mcu has no further data to send after
the first packet then the data could get delayed for an extended
period of time.

To avoid this, check for transmissions that could end on a maximum
sized packet and send that data in two packets instead.  This avoids
this unusual corner case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-15 18:22:45 -05:00
Kevin O'Connor
ec56167032 usb_cdc_ep: Define endpoint sizes in usb_cdc_ep.h
Move the definition of the usb endpoint sizes from usb_cdc.h to
usb_cdc_ep.h .  This allows individual boards to override the default
endpoint sizes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-15 18:22:45 -05:00
Kevin O'Connor
15339aec64 docs: Improve suggestions on bytes_invalid in CANBUS_Troubleshooting.md
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-15 18:20:04 -05:00
Kevin O'Connor
a90110d9ba docs: Note stealthchop_threshold doesn't impact sensorless homing
Reported by @paulfertser.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-15 13:55:19 -05:00
Nicholas Parry
e24ea3652c
docs: Fixed incorrect spelling in Config_Reference.md (#6819)
changed spelling of single word

Signed-off-by: Nicholas Parry <rounded-gully-5r@icloud.com>
2025-02-15 13:06:29 -05:00
JamesH1978
508c28e689
spi_flash: Update board_defs.py - BTT Octopus Max EZ (#6817)
Addition to the board_defs file for the BTT Octopus Max EZ, written and confirmed by discord user Nikki @winningfaith81

Signed-off-by: James Hartley <james@hartleyns.com>
2025-02-15 13:04:57 -05:00
Timofey Titovets
fec3e685c9 stm32: h7 spi support reload mode & frequency
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-02-06 12:10:29 -05:00
Lexi Beavil
b16cb6575d docs: Fix broken link to MainsailOS
The documentation install page has a link to the old mainsail OS site, which is no longer available

Signed-off-by: Lexi Beavil <github@aeroniemi.com>
2025-02-05 15:07:54 -05:00
Auxon
329fbd01d8
docs: Update Pressure_Advance.md (#6808)
Added language to disable "scarf joint" seams as it messes with the TUNING_TOWER script.

Signed-off-by: Roman Simanovich <romsimanovich@gmail.com>
2025-02-04 19:08:05 -05:00
Kevin O'Connor
01b0e98ab2 klippy-requirements: Require setuptools on python 3.12
The python-can v3.3.4 package requires setuptools to be an explicit
dependency when run on python v3.12, but there is no single version of
setuptools that runs on all supported versions of python.  So, tie
setuptools to python versions 3.12 or later.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 20:53:33 -05:00
Kevin O'Connor
638c085ffa mkdocs-requirements: Update jinja dependency to 3.1.5
It appears there was a security vulnerability in Jinja v3.1.4 .  The
Klipper docs are not impacted by this vulnerability, but it's simple
enough to increment the version to avoid warnings.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 19:01:09 -05:00
Pedro Lamas
8a2de5f23e save_variables: Check lowercase variable names
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2025-02-02 18:52:02 -05:00
Kevin O'Connor
2c90c97ccd usb_canbus: Detect canbus stalls when in usb to canbus bridge mode
If the low-level canbus stops working then it could become impossible
to send messages to and from the canbus bridge node itself.  This can
make it difficult to diagnose canbus problems.

Change the canbus bridge code to detect if message transmits become
stalled for 50+ milliseconds and go into a "discarding" state.  In
this discarding state, messages destined for the canbus will be
discarded until the canbus becomes active again.  In this discarding
state it will therefore be possible to transmit messages to and from
the canbus bridge node.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00
Kevin O'Connor
2db2ef82f2 canbus_stats: Periodically report canbus interface statistics
Add support for a new get_canbus_status command to canserial.c .

Add new canbus_stats.py module that will periodically query canbus
mcus for connection status information.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00
Kevin O'Connor
eb0581c264 atsam: Add support for reporting canbus state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00
Kevin O'Connor
61fb5fe29c atsamd: Add support for reporting canbus state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00
Kevin O'Connor
9fd415d3f5 rp2040: Add support for reporting canbus state
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00
Kevin O'Connor
b7366ae3fc stm32: Add support for reporting canbus state from fdcan.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00
Kevin O'Connor
6cdcf75e6b stm32: Add support for reporting canbus state from can.c
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-02-02 18:43:34 -05:00