Commit Graph
3149 Commits
Author SHA1 Message Date
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
Timofey Titovets 0dff097b72 stepcompress: wrap steps in struct qstep
That allows us to make it self-explanatory what is contained here.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:37:31 -05:00
Timofey Titovets 0c2c1dd13b bus: allow mark i2c as write only
If the bus is write only, with new i2c_transfer code
it is possible to at least provide some feedback on error

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:01:45 -05:00
Timofey Titovets 8965958a8b bus: raise I2C errors on the host side
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-07 14:01:45 -05:00
Timofey Titovets 87ea2ff1ce temperature_combined: fix operations on empty list
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-05 21:23:28 -05:00
bigtreetech 36d9a77580 temperature_combined: add additional sensor values(humidity, pressure, gas)
Signed-off-by: Alan.Ma from BigTreeTech tech@biqu3d.com
2026-02-05 12:19:33 -05:00
Dmitry Butyugin 4c89f7f826 generic_cartesian: Full IQEX printers support (#7165)
Signed-off-by: Dmitry Butyugin <dmbutyugin@google.com>
2026-02-04 16:54:05 -05:00
Timofey Titovets ca7d90084c probe: disable PROBE_CALIBRATE for Eddy
PROBE_CALIBRATE will try to adjust z_offset
Which will produce a confusing outcome and
will not do what it is supposed to do

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-02-02 19:25:43 -05:00
Timofey Titovets 85ccd1d9df temperature_probe: fix missing kin_pos
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-01-30 18:30:07 -05:00
Kevin O'Connor 576d0ca13d probe_eddy_current: Minor reorg to PrinterEddyProbe startup
The EddyTap class doesn't need the calibration object.  Add some code
comments.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-01-30 14:00:55 -05:00
Kevin O'Connor 1fe9fb3ad4 trigger_analog: Don't report trigger time as the peak time
There are some rare corner cases where reporting the peak time could
cause hard to debug issues (for example, the peak time could
theoretically be a significant time prior to the actual trigger time,
which could possibly cause unexpected clock rollover issues).  Now
that the host code does not utilize the peak time for "tap" detection,
it can be removed from the mcu code.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-01-29 20:57:55 -05:00
Timofey Titovets 0795fb0141 probe_eddy_current: analyze tap data
To cancel out any lag, filter data on the host
Then to avoid derivatives lag,
compute central difference.

Assume that peak velocity is always the moment
right before collision happens.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-01-29 20:57:55 -05:00
Timofey Titovets 5fb9902dda sos_filter: define filtfilt call
To implement host-side analysis of tap data,
we need a way to apply the same filtering as on the mcu.
As bonus, it cancels the induced signal delay.

Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2026-01-29 20:57:55 -05:00
Kevin O'Connor 5c23f9296a probe_eddy_current: implement tap support
Use SOS filters + derivative filter to generate dF/dT on mcu.
Feed that to the MCU's trigger_analog peak detection.
Interpret peak time as a tap event

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Signed-off-by: Timofey Titovets <nefelim4ag@gmail.com>
2026-01-29 20:57:55 -05:00