aboutsummaryrefslogtreecommitdiffstats
path: root/klippy
Commit message (Collapse)AuthorAgeFilesLines
* gcode_arc: refactor simplifyTimofey Titovets2024-08-121-20/+22
| | | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* servo: Asynchronous adjustments of servo positionDmitry Butyugin2024-08-031-3/+5
| | | | | | | | | | | This change follows the same approach as implemented for fan control. The change removes the move queue flushing when changing servo position, which does not appear to be necessary. This can be beneficial, for example, for WS7040-based cooling on IDEX setups where the servo can be used to control the air flow between the toolheads, with this change eliminating micro-stutters of the toolhead on servo position adjustment. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* idex_modes: Improved restoring position in RESTORE_DUAL_CARRIAGE_STATEDmitry Butyugin2024-08-031-6/+28
| | | | | | | | Previous implementation could crash the idex carriages into each other. The new code moves the idex carriages together, eliminating this risk and decreasing the time needed to restore the carriages positions. Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* load_cell: Don't start sensor on startupKevin O'Connor2024-07-311-8/+0
| | | | | | Also, don't report an empty status. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* ads1220: Add ADS1220 bulk sensor to load_cellGareth Farrington2024-07-312-0/+189
| | | | | | Add support for the ADS1220 as an alternative to HX71x that supports SPI and higher sample rates. Signed-off-by: Gareth Farrington <gareth@waves.ky>
* hx71x: Load Cell Skeleton and HX71x bulk ADCGareth Farrington2024-07-312-0/+206
| | | | | | | * Create the load_cell host module skeleton to create the sensors and start taking samples. * Add support for the HX717 and HX711 ADC sensors. Signed-off-by: Gareth Farrington <gareth@waves.ky>
* probe_eddy_current: support thermal compensationEric Callahan2024-07-171-7/+31
| | | | Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* temperature_probe: probe temperature sensorEric Callahan2024-07-171-0/+716
| | | | | | | | Add temperature sensor with thermal drift calibration. Currently only Eddy Current based probes support calibration. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* gcode: Minor change to suppress python warning on '\s'Kevin O'Connor2024-07-111-1/+1
| | | | | | Reported by @matdibu. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* extruder: Allow dynamic adjustment of pressure advance (#6635)Dmitry Butyugin2024-07-113-19/+78
| | | Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
* sht3x: use periodic report mode (#6634)Timofey Titovets2024-07-062-13/+25
| | | Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
* serialhdl: Catch IOError in connect_canbus()Kevin O'Connor2024-07-051-1/+1
| | | | | | | It seems the can library on Python2 can sometimes raise an IOError exception on a failure. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* smart_effector: Define get_position_endstop() wrapperKevin O'Connor2024-07-041-0/+1
| | | | | | Reported by @noisyfox. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* temperature_mcu: Enhance "ADC out of range" error reportsKevin O'Connor2024-06-211-4/+10
| | | | | | Try to report which ADC is reporting out of range. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adc_temperature: Enhance "ADC out of range" error reportsKevin O'Connor2024-06-211-4/+38
| | | | | | Try to report which ADC is reporting out of range. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Rename setup_minmax() to setup_adc_sample()Kevin O'Connor2024-06-217-25/+24
| | | | | | | Rename this method so that it is more distinct from the the common temperature setup_minmax() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* error_mcu: Support mechanism to add per-instance context to a shutdownKevin O'Connor2024-06-211-2/+13
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* error_mcu: Move formatting of mcu connect errors to error_mcu moduleKevin O'Connor2024-06-212-9/+16
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* error_mcu: Move mcu protocol error reporting to error_mcu moduleKevin O'Connor2024-06-212-40/+47
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* error_mcu: Move shutdown error message formatting to new error_mcu.py moduleKevin O'Connor2024-06-213-46/+87
| | | | | | | | | Create a new module to help format verbose mcu error messages. Move the shutdown message formatting to this module. This moves the error formatting out of the background thread and out of the critical shutdown code path. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bed_mesh: add support for MESH_PPS param in BMCEric Callahan2024-06-191-0/+6
| | | | | | In addition, do not respond with generated points. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: use generated XY positions in probe_finalize()Eric Callahan2024-06-191-26/+31
| | | | | | | | | | | | | The scan modes provide kinematic XYZ coordinates in the probe results. These positions may deviate from the requested positions, which can introduce errors in mesh generation when transposing the result into the Z matrix. Rely on the coordinates generated by bed mesh to transpose the matrix, presuming that points at the same index in the list match. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: add dump_mesh webhooks APIEric Callahan2024-06-191-0/+44
| | | | | | | Returns current mesh configuration and state. Includes probed and mesh matrices, saved profiles, current points, and travel paths. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* bed_mesh: optimize rapid travel pathsEric Callahan2024-06-191-194/+495
| | | | | | | | | This adds supplemental path generation that implements "overshoot" when a change of direction is performed during a rapid scan. This overshoot reduces measurement error at the extremes of the mesh along the X axis. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
* probe_eddy_current: Add support for "rapid_scan" modeKevin O'Connor2024-06-191-2/+14
| | | | | | | Add a scanning mode that does not require pausing the toolhead at each probe point. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* configfile: Allow getchoice() to take a listKevin O'Connor2024-06-1711-11/+12
| | | | | | If a list is passed to getchoice(), seamlessly convert it to a dict. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* axis_twist_compensation: Fix missing probe importKevin O'Connor2024-06-151-1/+1
| | | | | | Fixes missing import introduced in commit bec47e04. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* axis_twist_compensation: No need to rename bed_mesh and manual_probeKevin O'Connor2024-06-151-5/+5
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Add support for probing in "scan" modeKevin O'Connor2024-06-142-1/+34
| | | | | | | When probing in "scan" mode, the toolhead will pause at each position, but does not descend. This can notably reduce the total probing time. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Calculate toolhead position along with probed positionKevin O'Connor2024-06-141-3/+15
| | | | | | | Support calculating the low-level kinematic toolhead position while calculating the probed frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Process samples as they arriveKevin O'Connor2024-06-141-10/+22
| | | | | | Convert samples into probe frequencies as the samples arrive. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Generate Z height from average frequencyKevin O'Connor2024-06-141-6/+16
| | | | | | | | | Calculate the average frequency from a set of samples, and then calculate the estimated Z height from that frequency. This may improve accuracy, as the frequency to Z height is not linear and averaging after the non-linear transform could bias the results. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: Introduce new EddyGatherSamples helper classKevin O'Connor2024-06-141-63/+84
| | | | | | | Split the sample gathering code out of EddyEndstopWrapper class and into a new EddyGatherSamples class. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Gather multiple results in ProbeSessionHelperKevin O'Connor2024-06-141-15/+27
| | | | | | | | | Change run_probe() to gather the results locally, and introduce a new pull_probed_results() method that returns the previously probed results. This is in preparation for future probing code that benefits from batching probe results. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Rework ProbePointsHelper to store results locallyKevin O'Connor2024-06-141-27/+39
| | | | | | | | | Store the results of each probe attempt in a local "results" variable (instead of a class variable) when performing "automatic" probes. This is in preparation for gathering the results in the probing implementation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* sensor_bulk: Change maximum data size from 52 to 51 bytesKevin O'Connor2024-06-102-2/+2
| | | | | | | | | | | | Reduce the maximum data size from 52 bytes to 51 bytes. This will enable support for 2-byte response ids. This change would alter the behavior of the ldc1612 sensor support. Force an ldc1612 command name change so that users are alerted that they must rebuild the micro-controller code upon update of the host code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* msgproto: Support multi-byte command and response idsKevin O'Connor2024-06-102-32/+31
| | | | | | | | Update the msgproto.py code so that it can support message ids that are larger than a single byte. (The host C code in klippy/chelper/msgblock.c already supports multi-byte ids.) Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Simplify PrinterProbe() now that there are no external callersKevin O'Connor2024-06-101-4/+5
| | | | | | Create the mcu_probe interface locally within PrinterProbe(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe_eddy_current: No need to use PrinterProbe() classKevin O'Connor2024-06-101-3/+15
| | | | | | | Directly register the PrinterEddyProbe() class as the main probe interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* smart_effector: No need to use PrinterProbe() classKevin O'Connor2024-06-101-4/+16
| | | | | | | Directly register the SmartEffectorProbe() class as the main probe interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: No need to use PrinterProbe() classKevin O'Connor2024-06-101-8/+22
| | | | | | | Directly register the BLTouchProbe() class as the main probe interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Move add_steppers() logic to HomingViaProbeHelper classKevin O'Connor2024-06-103-21/+7
| | | | | | Perform the initial add_steppers() configuration in a single location. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Use ppins.setup_pin() helperKevin O'Connor2024-06-101-4/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* bltouch: Use ppins.setup_pin() helperKevin O'Connor2024-06-101-4/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Use an event for axis twist compensation updatesKevin O'Connor2024-06-102-12/+9
| | | | | | | Instead of directly calling axis_twist_compensation, send an event that can perform the necessary updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Ensure all external callers always call end_probe_session()Kevin O'Connor2024-06-101-21/+26
| | | | | | | | Rework ProbeSessionHelper's multi_probe_start() and multi_probe_end() to start_probe_session() and end_probe_session(). Ensure all external callers always invoke these methods prior to running run_probe(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Split z_virtual_endstop handling to new HomingViaProbeHelper classKevin O'Connor2024-06-101-31/+51
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Move offset handling to new ProbeOffsetsHelper classKevin O'Connor2024-06-101-8/+14
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Move PROBE_ACCURACY command to ProbeCommandHelper classKevin O'Connor2024-06-101-66/+74
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* probe: Move PROBE_CALIBRATE to ProbeCommandHelper classKevin O'Connor2024-06-101-31/+35
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>