aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras
Commit message (Collapse)AuthorAgeFilesLines
* heaters: Confirm heater setting in mcu every 3 seconds instead of 5Kevin O'Connor2025-04-281-2/+2
| | | | | | | 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>
* pwm_tool: Use mcu.min_schedule_time() and mcu.max_nominal_duration()Kevin O'Connor2025-04-281-6/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* led: Use mcu.min_schedule_time() and mcu.max_nominal_duration()Kevin O'Connor2025-04-281-8/+7
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pwm_cycle_time: Use mcu.min_schedule_time() and mcu.max_nominal_duration()Kevin O'Connor2025-04-281-9/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Use mcu.min_schedule_time() and mcu.max_nominal_duration()Kevin O'Connor2025-04-281-9/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lis3dh: increase scale from 8g to 16gWulfsta2025-04-281-3/+3
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* probe: Remove ProbeEndstopSessionHelperKevin O'Connor2025-04-183-18/+18
| | | | | | Have all callers instantiate the individual helper classes directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Separate probe style commands from homing operationsKevin O'Connor2025-04-181-20/+39
| | | | | | | Separate homing operations (as called from probe:z_virtual_endstop) from the normal probe command handling. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Do not support QUERY_PROBE commandKevin O'Connor2025-04-181-2/+1
| | | | | | | Report an error if a user issues a QUERY_PROBE command (instead of always returning not-triggered). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add a new LookupZSteppers helper classKevin O'Connor2025-04-181-7/+14
| | | | | | | Split code to lookup the Z stepper from HomingViaProbeHelper to new LookupZSteppers class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Convert probing_move() callback to use regular probe sessions systemKevin O'Connor2025-04-182-22/+39
| | | | | | | | Use the normal probe_session_start(), run_probe(), pull_probed_results(), and end_probe_session() API from ProbeSessionHelper. This removes the custom probing_move() callback. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Change probing_move() to pass a gcmd instead of (pos, speed)Kevin O'Connor2025-04-182-16/+25
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add a new ProbeParameterHelper classKevin O'Connor2025-04-182-35/+44
| | | | | | | Split multi-sample config reading from ProbeSessionHelper to a new ProbeParameterHelper class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add a new lookup_minimum_z() helper functionKevin O'Connor2025-04-181-8/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add a new ProbeEndstopSessionHelper classKevin O'Connor2025-04-184-7/+15
| | | | | | | Move the HomingViaProbeHelper() instance from ProbeSessionHelper to a new ProbeEndstopSessionHelper class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Add a default probing_move() function to HomingViaProbeHelperKevin O'Connor2025-04-184-12/+11
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* manual_stepper: Implement "drip moves" for manual stepper STOP_ON_ENDSTOPKevin O'Connor2025-04-181-5/+19
| | | | | | | | | | | | | Currently, `MANUAL_STEPPER STOP_ON_ENDSTOP=1` type commands will move until hitting the endstop, but it will still always consume the total amount of move time. That is, following moves can't be started until the total possible time of the homing move is completed. Implement "drip moves" so that the code only schedules the movement in small segments. This allows following movements to be scheduled without a significant delay. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* hall_filament_width_sensor: Add filament switch values to statusRussell Cloran2025-04-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | `hall_filament_width_sensor` contains a runout sensor object internally. This exposes those values in the API status result. ``` SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","filament_detected","is_active","Diameter","Raw"]}}} GOT: b'{"id":123,"result":{"eventtime":199567.823596603,"status":{"hall_filament_width_sensor":{"enabled":true,"filament_detected":true,"is_active":true,"Diameter":1.9499999999999986,"Raw":6113}}}}' ``` The duplication of `is_active` and `enabled` seems confusing, but both of these can be independently manipulated by GCode: ``` SEND: {"id":123,"method":"gcode/script","params":{"script":"DISABLE_FILAMENT_WIDTH_SENSOR"}} GOT: b'{"id":123,"result":{}}' SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}} GOT: b'{"id":123,"result":{"eventtime":199770.446013297,"status":{"hall_filament_width_sensor":{"enabled":true,"is_active":false}}}}' SEND: {"id":123,"method":"gcode/script","params":{"script":"SET_FILAMENT_SENSOR SENSOR=hall_filament_width_sensor ENABLE=0"}} GOT: b'{"id":123,"result":{}}' SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}} GOT: b'{"id":123,"result":{"eventtime":199847.927726196,"status":{"hall_filament_width_sensor":{"enabled":false,"is_active":false}}}}' ``` Signed-off-by: Russell Cloran <rcloran@gmail.com>
* tmc: add missing freewheel config optionsTimofey Titovets2025-04-173-0/+3
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* i2c_software: pass pulse ticks from hostTimofey Titovets2025-04-171-0/+12
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* software_spi: set rate limiting ticks from the hostTimofey Titovets2025-04-171-0/+13
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* led: Fix off-by-one bug in SET_LED_TEMPLATE INDEX parameterKevin O'Connor2025-04-111-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* force_move: Make sure to use lower() on SET_KINEMATIC_POSITION CLEAR_HOMEDKevin O'Connor2025-04-081-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* force_move: Support a SET_HOMED parameter to SET_KINEMATIC_POSITIONKevin O'Connor2025-04-081-6/+13
| | | | | | | | | | | | | | | 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>
* axis_twist_compensation: Fix AttributeError on klippy connect state (#6881)Maksim Bolgov2025-04-051-3/+2
| | | | | Object 'configfile' has no attribute 'error' Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
* temperature_combined: avoid crash with temperature monitorsTimofey Titovets2025-04-051-5/+13
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* temperature_combined: delay initializationTimofey Titovets2025-04-051-1/+3
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* adxl345: Allow read and write 127 register addressMRX80242025-04-031-2/+2
| | | | | | icm20948 accelerometer has an ACCEL_CONFIG register at address 127 Signed-off-by: Maksim Bolgov maksim8024@gmail.com
* icm20948: Formatting refactorMRX80242025-04-031-29/+24
| | | | Signed-off-by: Maksim Bolgov maksim8024@gmail.com
* icm20948: Transition from 8g to 16g accels scaleMRX80242025-04-031-3/+3
| | | | | | During standard resonance measurements, the icm20948 in 8g mode may reach the accels max threshold. Signed-off-by: Maksim Bolgov maksim8024@gmail.com
* icm20948: Fix sample rate and accels scale selectionMRX80242025-04-031-0/+7
| | | | | | 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
* output_pin: Make it possible to assign dicts/lists as template parametersKevin O'Connor2025-04-031-3/+10
| | | | | | | | | 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>
* ldc_1612: Supports configurable external crystal frequency (#6734)XiaoK2025-03-291-5/+7
| | | | | | | 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>
* output_pin: Fix handling of template rendering errorsKevin O'Connor2025-03-251-0/+1
| | | | | | | Make sure to assign 'value' on a rendering error to avoid an internal error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan_generic: Fix handling of template rendering errorsKevin O'Connor2025-03-251-0/+1
| | | | | | | Make sure to assign 'value' on a rendering error to avoid an internal error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* buttons: fixes incorrect parametersPedro Lamas2025-03-211-1/+1
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* buttons: Debounce gcode_button and filament_switch_sensor (#6848)Gareth Farrington2025-03-205-14/+54
| | | | | Add `debounce_delay` config option which sets the debounce time, defaults to 0 Signed-off-by: Gareth Farrington <gareth@waves.ky>
* load_cell: Load cell gram scale (#6729)Gareth Farrington2025-03-203-11/+498
| | | | | | | | | | | | | | * 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>
* axis_twist_compensation: allow compensating both axis at oncePhilippe Daouadi2025-03-121-15/+0
| | | | | | | 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>
* axis_twist_compensation: Remove the auto parameteryochiwarez2025-03-081-161/+16
| | | | | | from axis_twist_compensation Signed-off-by: Jorge Apaza Merma <yochiwarez@gmail.com>
* gcode_macro: Expand template syntax errors (#6839)Timofey Titovets2025-03-071-0/+6
| | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* icm20948: Add support for ICM20948 accelerometer (#6756)Paul Hansel2025-03-041-0/+171
| | | Signed-off-by: Paul Hansel <github@paulhansel.com>
* skew_correction: Supports retrieving the name of the currently loaded skew ↵GofranChang2025-02-271-1/+6
| | | | | correction … (#6821) Signed-off-by: Zhang Gaofan <zhanggaofan0827@gmail.com>
* bed_mesh: reduce generated point loggingEric Callahan2025-02-261-4/+6
| | | | | | | | | | | | | 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>
* sensor_lis2dw: remove commented code and fix formattingWulfsta2025-02-261-3/+0
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* save_variables: Check lowercase variable namesPedro Lamas2025-02-021-0/+2
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* usb_canbus: Detect canbus stalls when in usb to canbus bridge modeKevin O'Connor2025-02-021-0/+12
| | | | | | | | | | | | | | | 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>
* canbus_stats: Periodically report canbus interface statisticsKevin O'Connor2025-02-021-0/+68
| | | | | | | | | 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>
* garbage_collection: freeze objects on klippy ready (#6794)Branden Cash2025-02-021-0/+31
| | | | | 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>
* screws_tilt_adjust: initialize status result as a dictionaryPedro Lamas2025-01-241-1/+1
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>