hall_filament_width_sensor: Toggle for flow compensation

Adds a toggle to enable or disable flow compensation based on the
filament width sensor readings without disabling the sensor entirely.

Useful on printers where the hall effect sensor is too inaccurate to
helpfully adjust the extrusion multiplier, but is good enough to act as
a filament runout sensor.

The new setting defaults to true to preserve the existing sensor
behavior.

Existing width sensor G-Code commands are updated to optionally enable
and disable flow compensation and to show the state of the sensor and
command outputs are normalized.

Also includes updates to the relevant doc pages.

Signed-off-by: Ben Lye ben@lye.co.nz
This commit is contained in:
Ben Lye
2026-03-05 09:13:20 +00:00
committed by KevinOConnor
parent b0e6ca45fc
commit 4fba8e4829
5 changed files with 95 additions and 46 deletions

View File

@@ -248,6 +248,7 @@ object:
- all items from
[filament_switch_sensor](Status_Reference.md#filament_switch_sensor)
- `is_active`: Returns True if the sensor is currently active.
- `flow_compensation_enabled`: Returns True if flow compensation is enabled.
- `Diameter`: The last reading from the sensor in mm.
- `Raw`: The last raw ADC reading from the sensor.