1581 Commits

Author SHA1 Message Date
Kevin O'Connor
037377b927 led: Fix off-by-one bug in SET_LED_TEMPLATE INDEX parameter
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-11 12:00:34 -04:00
Kevin O'Connor
4b9cb36247 force_move: Make sure to use lower() on SET_KINEMATIC_POSITION CLEAR_HOMED
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 23:30:08 -04:00
Kevin O'Connor
f3e89e25c5 force_move: Support a SET_HOMED parameter to SET_KINEMATIC_POSITION
Commit 70838797 added support for clearing the homing state in
SET_KINEMATIC_POSITION commands.  However, it can be difficult to use
that support as the default for SET_KINEMATIC_POSITION is to set all
axes as homed.

Add a new SET_HOMED parameter to allow one to explicitly request which
axes to consider in a homed state.

Also introduce a CLEAR_HOMED parameter and prefer that to the existing
CLEAR parameter.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-08 23:23:05 -04:00
Maksim Bolgov
46ee920b93
axis_twist_compensation: Fix AttributeError on klippy connect state (#6881)
Object 'configfile' has no attribute 'error'

Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
2025-04-05 21:36:35 -04:00
Timofey Titovets
3a9e9a4bef temperature_combined: avoid crash with temperature monitors
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-05 21:27:37 -04:00
Timofey Titovets
3beb465247 temperature_combined: delay initialization
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2025-04-05 21:27:37 -04:00
MRX8024
52b07f467e adxl345: Allow read and write 127 register address
icm20948 accelerometer has an ACCEL_CONFIG register at address 127

Signed-off-by: Maksim Bolgov maksim8024@gmail.com
2025-04-03 14:08:23 -04:00
MRX8024
81a1a03ed0 icm20948: Formatting refactor
Signed-off-by: Maksim Bolgov maksim8024@gmail.com
2025-04-03 14:08:23 -04:00
MRX8024
869440a7ed icm20948: Transition from 8g to 16g accels scale
During standard resonance measurements, the icm20948 in 8g mode may reach the accels max threshold.

Signed-off-by: Maksim Bolgov maksim8024@gmail.com
2025-04-03 14:08:23 -04:00
MRX8024
20f26b534d icm20948: Fix sample rate and accels scale selection
To set a value in the SET_ACCEL_CONFIG register, you must first go to BANK_2.

Signed-off-by: Maksim Bolgov maksim8024@gmail.com
2025-04-03 14:08:23 -04:00
Kevin O'Connor
be429caba3 output_pin: Make it possible to assign dicts/lists as template parameters
The output_pin template code has a cache to speed up duplicate
rendering of templates.  However, this cache doesn't work if one of
the parameters is a Python list or dictionary.  Just disable the cache
in this case.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-04-03 13:38:31 -04:00
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
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
Pedro Lamas
fb91aad583 buttons: fixes incorrect parameters
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2025-03-21 13:36:27 -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
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
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
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
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
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
Branden Cash
d57fe4395e
garbage_collection: freeze objects on klippy ready (#6794)
This significantly reduces the amount of data in the generation 2 garbage collection bucket from the initial startup of klipper.

Signed-off-by: Branden Cash <203336+ammmze@users.noreply.github.com>
2025-02-02 18:40:43 -05:00
Pedro Lamas
8c1037ef1b screws_tilt_adjust: initialize status result as a dictionary
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2025-01-24 19:13:36 -05:00
Konstantin Koch
ed796fcfaa
ads1x1x: added support for ADC chip (#6584)
Added a temperature sensor configuration for ADS1103, ADS1104, ADS1105, ADS1113, ADS1114 and ADS1115 chips that can be used to add Analog to Digital Conversion capability to machines that don't have that on their own. Like Raspberry Pi's or if more analog input pins are needed than the chip provides like for RP2040. Generally they can be used for any analog input, but the typical use case is for temperature measurement. This code also has been written with temperature measurement in mind and not as a general ADC.

Signed-off-by: Konstantin Koch <korsarnek@gmail.com>
Signed-off-by: Jack Wakefield <jackwakefield@protonmail.com>
2025-01-21 19:10:39 -05:00
Kevin O'Connor
6ab253366c force_move: Use strings for axes to clear in clear_homing_state()
Pass a string such as "xyz" to kin.clear_homing_state().  This makes
the parameter a little less cryptic.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-01-21 18:58:23 -05:00
Kevin O'Connor
4aa550837f toolhead: Pass set_position() homing_axes parameter as a string
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>
2025-01-21 18:58:23 -05:00
Kevin O'Connor
c72d73ec45 stepper_enable: Directly call clear_homing_state() on motor off event
Call clear_homing_state() on each motor off event.  This simplifies
the kinematic classes as they no longer need to register and handle
the motor_off event.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-01-21 18:58:23 -05:00
Kevin O'Connor
cf3b0475da tmc2240: Allow the slope_control field to be configured via printer.cfg
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-01-10 12:29:41 -05:00
Kevin O'Connor
aae29ba48b heaters: Disable heater if it appears main thread has stopped updating
Update the heating code to periodically check that the main thread is
operating properly.  This is a mitigation for some rare cases where
the main thread may lockup while the background heater updating code
continues to run.  The goal is to detect these rare failures and
disable future heater updates.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2025-01-10 12:22:49 -05:00
Dennis Marttinen
7083879700
force_move: Implement CLEAR for SET_KINEMATIC_POSITION (#6262)
`CLEAR` clears the homing status (resets the axis limits) without turning off
the motors. This is particularly useful when implementing safe Z homing in
`[homing_override]` on printers with multiple independent Z steppers (where
`FORCE_MOVE` can't be used).

Signed-off-by: Dennis Marttinen <twelho@welho.tech>
2025-01-10 10:41:09 -05:00
KrauTech
80d185c94c
z_tilt: return done when reties is 0 (#6766)
Signed-off-by: Chris Krause <krautech3d@gmail.com>
2024-12-19 15:24:44 -05:00
Timofey Titovets
2b9e041a86 angle: mt6826s added support
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2024-12-12 14:28:45 -05:00
Timofey Titovets
90c1b82baa angle: mt6816 added support
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2024-12-12 14:28:45 -05:00
Dmitry Butyugin
16b4b6b302
resonance_tester: Added a new sweeping_vibrations resonance test method (#6723)
This adds a new resonance test method that can help if a user has some mechanical problems with the printer.

Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2024-12-05 21:54:26 -05:00
Liam Powell
7f89668d6c
tmc2240: Correct maximum TMC2240 UART address. (#6757)
Signed-off-by: Liam Powell <liam@liampwll.com>
2024-12-02 13:30:57 -05:00
Alexander Bazarov
aecb29d2b0
display: Add support for AIP31068 based displays (#6639)
display: Add support for `AIP31068` based displays
2024-12-02 13:23:46 -05:00
Kevin O'Connor
58541a799e temperature_mcu: Add support for rp2350 MCUs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2024-11-14 11:17:52 -05:00
yochiwarez
38bf6f2693 axis_twist_compensation: AXIS_TWIST_COMPENSATION new parameter AUTO for autocalibration
This commit adds automatic calculation support for compensating X and Y axis twist in the axis_twist_compensation module.

Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
2024-11-12 22:10:04 -05:00
yochiwarez
4f3a7fd227 axis_twist_compensation: Implement Y-axis support
This commit implements support for the Y-axis in the axis_twist_compensation
module. This update enables the module to handle corrections for printers
with a twisted Y rail.

Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
2024-11-12 22:10:04 -05:00
MRX8024
6d1256ddcc
resonance_tester: Fix chips selection, add accel_per_hz selection (#6726)
Corrected issue where accelerometer names were incorrectly prefixed
with "adxl345", preventing the selection of other chip types when running TEST_RESONANCES.

Implemented support for selecting the `accel_per_hz` parameter when running TEST_RESONANCES.

docs: Update TEST_RESONANCES + SHAPER_CALIBRATE with missing parameters and bracket corrections

Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
2024-11-12 19:55:32 -05:00
Wulfsta
0f7887fffe sensor_lis2dw: add lis3dh sensor and i2c communication
Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
2024-11-12 19:50:48 -05:00
Pedro Lamas
eeb2678ec2 fan_generic: fixes missing logging import
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
2024-11-01 11:34:48 -04:00
Kevin O'Connor
31fe50ffa3 homing: Log a warning if probe alters stepper kinematic positions
After a probe attempt the toolhead position needs to be recalculated
to the position that the toolhead ultimately halted at.  Check that
the position setting wouldn't actually change the internal view of the
stepper motor and log a warning if any skew is detected.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2024-10-26 22:11:02 -04:00
Gareth Farrington
0c806d84f7
ads1220: Add input_mux and vref options to ADS1220 sensor (#6713)
* fix type comparison bug that stopped the sensor from initializing
* correct mismatch between docs and code for `sample_rate` (fixed to work same as hx71x)
* add input_mux, pga_bypass and vref options
* update configuration reference & fix typo

Signed-off-by: Gareth Farrington <gareth@waves.ky>
2024-10-24 11:07:05 -04:00