aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/pulse_counter.py
Commit message (Collapse)AuthorAgeFilesLines
* fan: Minor updates to tachometer handlingKevin O'Connor2021-03-011-2/+1
| | | | | | | | | | | Add new fields to Command_Templates.md. Remove unused self.rpm variable. Use an explicit get_frequency() method in keeping with Klipper's convention of not "peeking into member variables". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Add tachometer supportAdrian Keet2021-03-011-0/+79
This adds new config options for fans: 'tachometer_pin' to specify the GPIO pin, and 'tachometer_ppr' (default 2) to specify the number of signal pulses per revolution. The rpm is also exposed by get_status for command templates and the API server. For fast fans (at least 10000 RPM), the polling interval can be shortened using the 'tachometer_poll_interval' option. There is a new mcu object for a generic edge counter, which repeatedly polls a GPIO pin and periodically reports the count to the host. Signed-off-by: Adrian Keet <arkeet@gmail.com>