Commit Graph
3162 Commits
Author SHA1 Message Date
iamthecage 0d1445a723 shaper_defs: Fix missing comma in 3-HUMP EI shaper matrix (#7235)
Signed-off-by: Asheley Willet <asheley.willet@gmail.com>
2026-03-31 11:00:00 -04:00
Kevin O'Connor 4db1bf8ac6 probe_eddy_current: Calculate "tap" position from lift movement
Don't calculate the nozzle/bed contact position from the descent
movement.  Instead, obtain the data during the lifting movement and
determine the contact point by analyzing where the nozzle separates
from the bed.

This improves the precision and repeatability of the "tap" results.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-24 13:13:37 -04:00
Kevin O'Connor de280e237b probe_eddy_current: Retract at end of each "tap" probe
Perform lifting at the end of EddyTap.run_probe().  This is in
preparation for performing tap analysis during retraction.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-24 13:13:37 -04:00
Kevin O'Connor e5c3dfe7a8 probe_eddy_current: Use different defaults for "scan", "rapid_scan" and "tap"
Add a new EddyParameterHelper to override ProbeParameterHelper.

Only use the printer.cfg lift_speed, samples, sample_retract_dist,
samples_result, samples_tolerance, and samples_tolerance_retries
settings for normal probe operations.  Don't use these defaults when
using a "METHOD" set to "scan", "rapid_scan", or "tap".  Each of these
probing mechanisms is distinct and it's unlikely a user could
meaningfully set a default for all of them.

Don't set sample_retract_dist when using "scan" and "rapid_scan"
modes.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-24 13:13:37 -04:00
Kevin O'Connor 6c8c8d24d7 probe_eddy_current: Support new tap_z_offset config parameter
Theoretically a "tap" probe should detect the exact point that the
nozzle contacts the bed.  In practice, however, there can be a
systemic bias that one may wish to account for.  This bias may be due
to backlash, thermal expansion, a detection bias, or similar issues.

Add a new tap_z_offset config parameter to allow users to specify an
offset.

Also, update the Z_OFFSET_APPLY_PROBE command to support modifying
this value.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-24 13:07:19 -04:00
Kevin O'Connor 20df766e21 probe_eddy_current: Rename config option z_offset to descend_z
The config option 'z_offset' name is confusing as its behavior is
notably different from how other probe hardware uses 'z_offset'.
Rename to 'descend_z' to make its behavior more clear.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-24 13:07:19 -04:00
Kevin O'Connor 7f5e918331 manual_probe: Introduce new create_probe_result() helper function
Add a new create_probe_result() helper function that can generate a
ProbeResult using a toolhead position and a set of probe offsets.

Use this helper in other modules.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-24 13:07:19 -04:00
Kevin O'Connor 6416d3e2ca reactor: Improve comments in _end_greenlet()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-20 14:22:24 -04:00
Kevin O'Connor dcadac19b7 reactor: Move garbage collection logic from _check_timers() to new _check_gc()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-20 14:10:24 -04:00
Maksim Bolgov 01f089e710 heaters: Fix no heating on small max_power values (#7227)
If the config parameter "max_power" is less than 0.05, the heaters will never start heating. Added PWM threshold scaling with "max_power" value.

Signed-off-by: Maksim Bolgov <maksim8024@gmail.com>
2026-03-20 12:19:45 -04:00
Kevin O'Connor 0021798795 reactor: Move _g_dispatch updating from _dispatch_loop() to run()
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-19 18:27:27 -04:00
Kevin O'Connor 51ceda9ede reactor: Always create new greenlets from main process
If a greenlet is created from a greenlet then it seems the Python
interpreter will increment its call depth counter and that can
eventually lead to a RecursionError exception being raised.

To avoid this issue, switch back to the main run() instance if a new
greenlet needs to be created.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-19 18:27:27 -04:00
Kevin O'Connor 1370cf5c18 reactor: Simplify pause() call
Check for need to call _sys_pause() at start of pause().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-19 18:27:27 -04:00
Timofey Titovets 644cda5eca sht3x: fix exception type
Since 0bdee6b query commands return printer.command_error

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-03-09 22:19:27 -04:00
Timofey Titovets 88a71c3ce5 tmc: support tmc2240 sg4 homing
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:56:26 -05:00
Timofey Titovets 0c32f3bd99 tmc2240: allow enable SG4 threshold
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-03-04 19:56:26 -05:00
Timofey Titovets 4f4a9a27a8 tmc: simplify homing start/end
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:56:26 -05:00
Kevin O'Connor 94604293e8 mcu: Improve unknown message response warnings in AsyncResponseWrapper
When delaying response registration, don't warn about any of these
messages that arrive prior to the aactual response registration.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:50:53 -05:00
Kevin O'Connor c89393cdaf mcu: Rework mcu.register_response() to mcu.register_serial_response()
Rename mcu.register_response() to mcu.register_serial_response and
validate the message response format.

Only register the callbacks after the mcu has been initialized.  This
avoids invoking callbacks with data from a previous sessions, which
could lead to internal errors.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:50:53 -05:00
Kevin O'Connor 55577808cf mcu: Track if the mcu config phase has completed
Raise an error if mcu configuration commands are issued after the
config has been completed.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:50:53 -05:00
Kevin O'Connor 960813ac50 mcu: Minor code reorg in MCUConfigHelper
Split _send_config() into _finalize_config() and _send_cfg_init_commands().

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:50:53 -05:00
Kevin O'Connor e234f2415d hx71x: Remove dead self.bulk_queue code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:50:53 -05:00
Kevin O'Connor f33292aacc ads1220: Remove dead self.bulk_queue code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-04 19:50:53 -05:00
Kevin O'Connor f1fb57564f configfile: Fix deprecate() method
Commit 1473b79a moved the deprecate mesage generation to the
PrinterConfig() class, but failed to use the proper variable name for
'section'.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-03 14:47:40 -05:00
Timofey Titovets 7a44726492 pwm_tool: fix missing updates
Generate intermediate updates if a set_pwm() call schedules an update
far in the future.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-03-01 15:29:26 -05:00
Kevin O'Connor 0624cce4b3 probe_eddy_current: Support TAP_THRESHOLD parameter on "tap" probes
Allow the "tap_threshold" to be overriden during PROBE type commands.
This makes it easier to calibrate an initial tap_threshold.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-28 20:11:16 -05:00
Kevin O'Connor 7e0dcc3c49 probe_eddy_current: Improve gap detection in EddyTap
Verify no gaps at start and end of requested capture range.

Raise an error if a gap is detected.

Raise an error if not enough data collected during "tap".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-24 10:21:11 -05:00
Kevin O'Connor 016f6e62b8 probe_eddy_current: Stop measurements on an error in EddyScanningProbe
Register an event handler to make sure measurements are stopped if a
gcode error occurs while using EddyScanningProbe.  EddyTap and
EddyDescend use ProbeSessionHelper which already provides this
handling, but EddyScanningProbe doesn't use that wrapper so it must be
implemented manually.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-24 10:14:55 -05:00
Kevin O'Connor 0213ad7536 canbus_stats: Note mcu code deprecation if missing get_canbus_status
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:27:22 -05:00
Kevin O'Connor 90c72b7986 stepper: Note mcu code deprecation if missing STEPPER_STEP_BOTH_EDGE
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:27:22 -05:00
Kevin O'Connor 6bbc90697a bus: Note mcu code deprecation if missing i2c_transfer
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:27:22 -05:00
Kevin O'Connor ee28dec93d bus: Note mcu code deprecation if missing i2c_set_sw_bus
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:27:22 -05:00
Kevin O'Connor 016474b68d bus: Note mcu code deprecation if missing spi_set_sw_bus
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:27:22 -05:00
Kevin O'Connor a445013f7a configfile: Add support for warning on deprecated mcu code
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:27:22 -05:00
Kevin O'Connor 2f2219b4b7 buttons: Use ADC batching for ADC based buttons
Increase ADC report time from every 15ms to every 10ms and batch every
5 reports into a single message.  This should improve the
responsiveness and reduce the communication overhead when using ADC
buttons.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:24:38 -05:00
Kevin O'Connor 8ed426b54c mcu: Convert ADC callback to pass a list of samples
Support batching multiple samples together and pass those samples to
the registered adc callback.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:24:38 -05:00
Kevin O'Connor 5a2fd1009d mcu: Change MCU_adc.get_last_value() to return (time, value)
Change the get_last_value() method to return time first then value
(instead of value, then time).  This makes get_last_value() match the
order of parameters that is used in the adc update callback.

This also fixes ads1x1x to return the "print_time" instead of a system
time.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:24:38 -05:00
Kevin O'Connor 41bc240b16 adccmds: Support batching multiple reports into a single message
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:24:38 -05:00
Dmitry Butyugin 187481e251 dual_carriage: Allow dual carriage inactivation
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2026-02-19 21:37:18 -05:00
Kevin O'Connor 57c2e0c960 manual_stepper: Support STOP_ON_ENDSTOP=probe
Support moving a manual_stepper until a trigger event, without
resetting the final position.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-14 14:08:21 -05:00
Kevin O'Connor 5a877d7220 manual_stepper: Rework STOP_ON_ENDSTOP parameter
Replace the integer values of STOP_ON_ENDSTOP with string values and
deprecate the older format.  The newer string values should make the
commands easier to understand and allow for more homing options in the
future.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-14 14:08:21 -05:00
Kevin O'Connor 21604d8bc7 configfile: Support warning for deprecated gcode commands
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-14 13:54:38 -05:00
Kevin O'Connor 1473b79ac0 configfile: Only warn once for each message sent to runtime_warning()
Also simplify the maintenance of warnings.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-14 13:54:38 -05:00
FranciscoStephens 8a210d23fe bmi160: Add support for BMI160 accelerometer
This adds host and firmware support for the Bosch BMI160 IMU. It includes support for both SPI and I2C communication protocols.

The firmware implementation includes a specific SPI wake-up sequence (dummy read) required to switch the sensor interface mode reliably. Validated on Linux MCU (SPI) and RP2040 (I2C) with stable 1600Hz ODR.

Signed-off-by: FranciscoStephens <francisco.stephens.g@gmail.com>
2026-02-12 17:46:33 -05:00
Kevin O'Connor 636a6141f1 probe: Fix application of axis_twist_compensation
Commit 2a1027ce changed the "probe:update_results" event to take a
list, but failed to update the callers to utilize that modified list
in its results.

Change axis_twist_compensation to update all members in the list and
change the callers to use the resulting list.

Reported by @ritzi26.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-11 09:31:25 -05:00
Kevin O'Connor 6d7d3403e4 stepcompress: Add some comments on internal structs
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-07 14:52:38 -05:00
Timofey Titovets 0a43774432 heaters: refactor to mux commands
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:42:41 -05:00
Timofey Titovets c85a1a6761 stepper_enable: refactor to mux commands
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:42:41 -05:00
Timofey Titovets cfd9dc7242 force_move: refactor to mux commands
Gcode mux supports arg verification and error output.
Just reuse it.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:42:41 -05:00
Timofey Titovets c2d0cc1967 gcode: enrich param errors
Give suggestion or avaliable options to the user.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:42:41 -05:00