Commit Graph

3 Commits

Author SHA1 Message Date
Kevin O'Connor b611e72a19 pulse_counter: Use "clock" suffix instead of "time" in commands
The debugging code knows how to handle fields that end in "clock".

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
2021-04-30 11:40:37 -04:00
Kevin O'Connor 4d3d25b1f7 fan: Minor updates to tachometer handling
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>
2021-03-01 14:57:40 -05:00
Adrian Keet 16d85d1a78 fan: Add tachometer support
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>
2021-03-01 14:53:13 -05:00