aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/hall_filament_width_sensor.py
Commit message (Collapse)AuthorAgeFilesLines
* Run black on all first party python codeTomasz Kramkowski2025-08-061-83/+98
|
* hall_filament_width_sensor: Add filament switch values to statusRussell Cloran2025-04-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | `hall_filament_width_sensor` contains a runout sensor object internally. This exposes those values in the API status result. ``` SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","filament_detected","is_active","Diameter","Raw"]}}} GOT: b'{"id":123,"result":{"eventtime":199567.823596603,"status":{"hall_filament_width_sensor":{"enabled":true,"filament_detected":true,"is_active":true,"Diameter":1.9499999999999986,"Raw":6113}}}}' ``` The duplication of `is_active` and `enabled` seems confusing, but both of these can be independently manipulated by GCode: ``` SEND: {"id":123,"method":"gcode/script","params":{"script":"DISABLE_FILAMENT_WIDTH_SENSOR"}} GOT: b'{"id":123,"result":{}}' SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}} GOT: b'{"id":123,"result":{"eventtime":199770.446013297,"status":{"hall_filament_width_sensor":{"enabled":true,"is_active":false}}}}' SEND: {"id":123,"method":"gcode/script","params":{"script":"SET_FILAMENT_SENSOR SENSOR=hall_filament_width_sensor ENABLE=0"}} GOT: b'{"id":123,"result":{}}' SEND: {"id":123,"method":"objects/query","params":{"objects":{"hall_filament_width_sensor":["enabled","is_active"]}}} GOT: b'{"id":123,"result":{"eventtime":199847.927726196,"status":{"hall_filament_width_sensor":{"enabled":false,"is_active":false}}}}' ``` Signed-off-by: Russell Cloran <rcloran@gmail.com>
* buttons: Debounce gcode_button and filament_switch_sensor (#6848)Gareth Farrington2025-03-201-1/+1
| | | | | Add `debounce_delay` config option which sets the debounce time, defaults to 0 Signed-off-by: Gareth Farrington <gareth@waves.ky>
* mcu: Rename setup_minmax() to setup_adc_sample()Kevin O'Connor2024-06-211-2/+2
| | | | | | | 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>
* hall_filament_width_sensor: max filament diameterSami Haahtinen2023-12-171-2/+3
| | | | | | | | | Add support for maximum filament diameter to hall filament width sensor. If the diameter of the filament diameter is larger than the limit, the virtual runout sensor will trigger. The default value is set to maximum flow adjustment threshold to prevent oversized filament from clogging. Signed-off-by: Sami Haahtinen <ressu@ressukka.net>
* hall_filament_width_sensor: fix range check error (#4113)Denis Ignatenko2021-03-271-2/+2
| | | Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
* hall_filament_width_sensor: Fix race condition (#3790)Pascal P2021-01-221-1/+5
| | | | | | Fix race condition of filament width sensor Added fix to similar code of TSL1401CL filament width sensor Signed-off-by: Pascal Pieper <accounts@pascalpieper.de>
* hall_filament_width_sensor: Fix Flow update before next pending_position ↵alocin732020-08-191-7/+14
| | | | | | | | | #3184 (#3198) After reading the first item of self.filament_array, filament_width is updated back to self.nominal_filament_dia or self.diameter instead of retaining the value until next pending_position. Updated Filament Menu Template. Signed-off-by: Nicola Falciani <nicola.fal@gmail.com>
* hall_filament_width_sensor: fix errorJanar Sööt2020-08-131-0/+1
| | | | | | Fix no attribute error in in get_status Signed-off-by: Janar Sööt <janar.soot@gmail.com>
* hall_filament_width_sensor: Added width logging (#2981)Denis Ignatenko2020-06-161-0/+17
| | | Signed-off-by: Denis Ignatenko deniss979@gmail.com
* extras: Use "from . import module" for relative importsKevin O'Connor2020-06-151-1/+1
| | | | | | Use alternate import syntax to improve Python3 compatibility. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* hall_filament_width_sensor: Fix whitespace errorsKevin O'Connor2020-06-061-3/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* HallFilamentWidthSensor: Use current width instead of nomal width while ↵matpab2020-06-061-7/+14
| | | | | | | delay is not over (#2907) Option for using the current diameter instead of nominal while the first measurement isn't in place Signed-off-by: Matthias Pabel <matthias.pabel@hs-augsburg.de>
* hall_filament_width_sensor: fix overflow issue on 12 bit adc (#2902)Denis Ignatenko2020-05-211-2/+2
| | | Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
* hall_filament_width_sensor: Increasing measure stability (#2836)Denis Ignatenko2020-05-181-3/+4
| | | Signed-off-by: Denis Ignatenko <deniss979@gmail.com>
* hall_filament_width_sensor: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-10/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Rename respond() to respond_raw()Kevin O'Connor2020-04-241-5/+5
| | | | | | | | | | | Rename the method to make it more clear that it is a low-level call that should be rarely used. Also, change gcode_button.py, hall_filament_width_sensor.py, and tsl1401cl_filament_width_sensor.py to use respond_info() instead of respond_raw(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* hall_filament_width_sensor: Added virtual runout sensor (#2535)Denis Ignatenko2020-03-011-5/+11
| | | Signed-off-by: Denis Ignatenko deniss979@gmail.com
* hall_filament_width_sensor: Add new filament sensortest3210-d2020-02-141-0/+180
Signed-off-by: Denis Ignatenko <deniss979@gmail.com>