6228 Commits
Author SHA1 Message Date
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 391834ba12 docs: Rework how METHOD= parameter works in G-Codes.md
Describe the METHOD= parameter in the probe_eddy_current chapter.

Use similar layout for both the load_cell_probe and probe_eddy_current
sections.

Avoid duplicating the METHOD= parmeter for other commands.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-27 20:20:33 -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 54c7b65d5d motan: Support capturing bmi160 and icm20948 accelerometer data
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-24 10:05:21 -05:00
Kevin O'Connor 3aa56f3bd0 motan: Rename "adxl345" dataset to "accelerometer"
Make it possible to use other types of accelerometers in the
motan_graph.py tool.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-24 10:05:21 -05:00
Kevin O'Connor 43b2d55d9b motan: Don't default to subscribing to all sensors in data_logger
Subscribing to all sensors can cause a burden on the MCU communication
channels.  Add a new '-s' command line option to data_logger.py that
allows a user to request the subscriptions that they wish to capture.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-24 10:05:21 -05:00
Timofey Titovets 60b6271c98 motan: print avaliable keys on error
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-23 21:38:57 -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 9e962ee3f4 adccmds: Add support for homing/probing triggering with regular mcu adc pins
Add support for trigger_analog to adccmds.c .

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-02-23 21:24:38 -05:00
Kevin O'Connor a44e905ffe trigger_analog: Support not compiling trigger_analog on small flash builds
Allow the user to deselect CONFIG_WANT_TRIGGER_ANALOG even if one of
the sensors could utilize the support.

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
Tom ce97c514ba linux: fixed array out of bounds access for GPIO setup in linux process (#7196)
Signed-off-by: Tom Mittendorf <tom.mittendorf@web.de>
2026-02-10 10:52:32 -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