TheJoshW / klipper

Klipper is a 3d-printer firmware
GNU General Public License v3.0
1 stars 0 forks source link

Refactor to use filament_switch_sensor.RunoutHelper #20

Closed TheJoshW closed 3 years ago

TheJoshW commented 3 years ago

Do not duplicate the functions of filament_switch_sensor, reuse them.

TheJoshW commented 3 years ago

Discussing with Kevin how to handle commands aggregation of filament_switch_sensor.RunoutHelper and handling and extension of its commands in filament_motion_sensor. I have removed all commands from filament_motion_sensor, so the filament_switch_sensor commands can be used to enable/disable the runout detection, however I still need a way to set detection length. The example I am working off, hall_filament_width_sensor, seems to ignore the filament_switch_sensor commands and creates its own enable command to start/stop the check timer which indirectly disables the filament_switch_sensor it aggregates. As I am implementing a filament sensor it would just add confusion to have two sets of commands for basically the same function.