aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* force_move: Use strings for axes to clear in clear_homing_state()Kevin O'Connor2025-01-2114-39/+38
| | | | | | | 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>
* toolhead: Pass set_position() homing_axes parameter as a stringKevin O'Connor2025-01-2116-23/+28
| | | | | | | | 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>
* stepper_enable: Directly call clear_homing_state() on motor off eventKevin O'Connor2025-01-2110-36/+1
| | | | | | | | 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>
* tmc2240: Allow the slope_control field to be configured via printer.cfgKevin O'Connor2025-01-101-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Disable heater if it appears main thread has stopped updatingKevin O'Connor2025-01-101-3/+7
| | | | | | | | | | 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>
* force_move: Implement CLEAR for SET_KINEMATIC_POSITION (#6262)Dennis Marttinen2025-01-1014-33/+61
| | | | | | | | `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>
* z_tilt: return done when reties is 0 (#6766)KrauTech2024-12-191-1/+1
| | | Signed-off-by: Chris Krause <krautech3d@gmail.com>
* angle: mt6826s added supportTimofey Titovets2024-12-121-2/+149
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* angle: mt6816 added supportTimofey Titovets2024-12-121-1/+47
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* resonance_tester: Added a new sweeping_vibrations resonance test method (#6723)Dmitry Butyugin2024-12-053-50/+134
| | | | | 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>
* tmc2240: Correct maximum TMC2240 UART address. (#6757)Liam Powell2024-12-021-1/+1
| | | Signed-off-by: Liam Powell <liam@liampwll.com>
* display: Add support for `AIP31068` based displays (#6639)Alexander Bazarov2024-12-022-2/+212
| | | display: Add support for `AIP31068` based displays
* klippy: Fix missing default parameter of invoke_async_shutdown()Kevin O'Connor2024-12-021-1/+1
| | | | | | Allow invoke_async_shutdown() to be called with just one parameter. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Improve checksum detection in get_raw_command_parameters()Kevin O'Connor2024-12-011-1/+1
| | | | | | | Only consider a trailing '*' to indicate a checksum if the remainder of the string is a number. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Some optimizations to get_raw_command_parameters()Kevin O'Connor2024-12-011-10/+10
| | | | | | Add some minor optimizations to the get_raw_command_parameters() code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Use the same M117/M118 fixup for M23Kevin O'Connor2024-12-011-2/+2
| | | | | | | | The M23 command has similar requirements for extracting the full parameter string that M117/M118 have. Use the same code for those fixups. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Fixup M117/M118 command identification in cmd_default()Kevin O'Connor2024-12-011-7/+9
| | | | | | | | Alter gcmd._command in cmd_default if the special M117/M118 handling is detected. This avoids having to recheck for this condition in get_raw_command_parameters(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Improve handling of extended g-code commands with '*;#' charactersKevin O'Connor2024-12-011-15/+11
| | | | | | | | | | | | The g-code command parser did not allow three characters to be passed as parameters to commands (asterisk, semicolon, pound sign). Rework the parsing code to better leverage the python shlex package so that these characters can be supported. In particular, this should allow better support for printing g-code files that have unusual characters in the filename. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Don't silently discard characters inside a command nameKevin O'Connor2024-12-011-7/+5
| | | | | | | | | | | Don't silently drop leading numbers and unusual characters at the start of a command - for example, don't interpret '99M88' as 'M88'. Don't silently drop spaces in a command - for example, don't interpret "M 101" as the command "M101". Doing so will cause other parts of the code (such as get_raw_command_parameters() ) to not work properly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Validate extended g-code command namesKevin O'Connor2024-12-011-0/+4
| | | | | | | Extended g-code command names may only contain A-Z, 0-9, and underscore, and the first two characters may not be digits. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Remove arbitrary constants controlling junction deviationKevin O'Connor2024-11-291-19/+19
| | | | | | | | | | | | | | | | When calculating the junction speed between two moves the code checked for angles greater than 0.999999 or less than -0.999999 to avoid math issues (sqrt of a negative number and/or divide by zero). However, these arbitrary constants could unnecessarily pessimize junction speeds when angles are close to 180 or 0 degrees. Change the code to explicitly check for negative numbers during sqrt and to explicilty check for zero values prior to division. This simplifies the code and avoids unnecessarily reducing some junction speeds. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Use delta_v2 when calculating centripetal forceKevin O'Connor2024-11-291-4/+5
| | | | | | | | | | | As a minor math optimization, it's possible to calculate: .5 * self.move_d * self.accel * tan_theta_d2 using: self.delta_v2 * .25 * tan_theta_d2 because self.delta_v2 is "2. * self.move_d * self.accel". Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_mcu: Add support for rp2350 MCUsKevin O'Connor2024-11-141-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgproto: Fix return type for create_command()Kevin O'Connor2024-11-131-1/+1
| | | | | | | Return an empty list instead of an emptry string if no command found. This improves compatibility within console.py on python3. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* axis_twist_compensation: AXIS_TWIST_COMPENSATION new parameter AUTO for ↵yochiwarez2024-11-121-1/+161
| | | | | | | | 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>
* axis_twist_compensation: Implement Y-axis supportyochiwarez2024-11-121-45/+140
| | | | | | | | 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>
* configfile: Fix comments on same line as [include xxx.cfg] directiveKevin O'Connor2024-11-121-0/+4
| | | | | | | | Commit 9d4ab862 broke support for '#' style comments on the same line as [include] config directives. Fix by adding back in the check for comments in _parse_config(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* resonance_tester: Fix chips selection, add accel_per_hz selection (#6726)MRX80242024-11-121-5/+3
| | | | | | | | | | 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>
* sensor_lis2dw: add lis3dh sensor and i2c communicationWulfsta2024-11-122-32/+105
| | | | Signed-off-by: Luke Vuksta <wulfstawulfsta@gmail.com>
* fan_generic: fixes missing logging importPedro Lamas2024-11-011-0/+1
| | | | Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
* configfile: Separate access tracking to new ConfigValidate classKevin O'Connor2024-10-301-38/+73
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Only check for [include file] directives from main printer.cfgKevin O'Connor2024-10-301-37/+52
| | | | | | | Don't look for includes in autosave data nor from the internal menu, display, and temperature configs. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Don't read the autosave data if multiple autosave headers presentKevin O'Connor2024-10-301-1/+6
| | | | | | Also, verify new autosave looks valid prior to writing it. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Split configfile code into three separate classesKevin O'Connor2024-10-301-160/+203
| | | | | | | | | | | | Separate out the low-level parsing code to a new ConfigFileReader() class. Separate out the auto-save handling code to a new ConfigAutoSave() class. This simplifies the main PrinterConfig() class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* homing: Log a warning if probe alters stepper kinematic positionsKevin O'Connor2024-10-262-4/+16
| | | | | | | | | 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>
* mcu: Only warn about mcu clock frequency if drift is more than 1%Kevin O'Connor2024-10-261-1/+2
| | | | | | This reduces the chance of spurious MCU clock configuration warnings. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ads1220: Add input_mux and vref options to ADS1220 sensor (#6713)Gareth Farrington2024-10-241-4/+33
| | | | | | | | * 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>
* fan: Fix restart request handlingKevin O'Connor2024-10-011-1/+1
| | | | | | | The change in parameter order introduced in commit f4143af4 failed to update the call _handle_request_restart() code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan_generic: Support setting a TEMPLATE on SET_FAN_SPEED commandsKevin O'Connor2024-09-301-3/+19
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Support calling set_speed() without a print_timeKevin O'Connor2024-09-304-13/+9
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Support setting a TEMPLATE on SET_PIN commandsKevin O'Connor2024-09-302-3/+21
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Move template evaluation code from led.py to output_pin.pyKevin O'Connor2024-09-302-95/+113
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* led: Generalize template evaluation so it is not dependent on LEDsKevin O'Connor2024-09-305-75/+76
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heaters: Fix typo - config.config_error() instead config.error()Kevin O'Connor2024-09-251-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* i2c: drop i2c_modify_bitsTimofey Titovets2024-09-221-17/+1
| | | | | | No longer used and niche Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* sx1509: drop i2c_modify_bitsTimofey Titovets2024-09-221-7/+5
| | | | | | | According to the datasheet default value is 0000 0000 We do not modify them in other places. Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* fan: Wait full kick_start_time even if request is for full speedKevin O'Connor2024-09-181-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Use GCodeRequestQueue to queue updatesKevin O'Connor2024-09-181-16/+17
| | | | | | | This is similar to 7940a6a7, but using gcrq.send_async_request() for requests that could be asynchronous. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Add send_async_request() support to GCodeRequestQueueKevin O'Connor2024-09-161-2/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* output_pin: Improve GCodeRequestQueue timing on duplicate requestsKevin O'Connor2024-09-162-17/+23
| | | | | | | | If there is a duplicate request it is not necessary to add a 100ms delay to the next update. Rework the callback signaling to better report these duplicate updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>