aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/fan.py
Commit message (Collapse)AuthorAgeFilesLines
* fan: Minor updates to tachometer handlingKevin O'Connor2021-03-011-3/+2
| | | | | | | | | | | 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-1/+34
| | | | | | | | | | | | | | 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>
* fan: Separate out the part cooling fan code from the generic fan codeKevin O'Connor2020-07-051-25/+35
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Use new GCodeCommand wrappersKevin O'Connor2020-05-051-4/+3
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Do not flush look-ahead queue on fan speed changeKevin O'Connor2020-01-031-4/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* FAN: Kick start fan when the increase is more than 50% (#2085)Justin Schuh2019-11-241-2/+2
| | | | | | | Large increases in fan speed can suffer from acceleration lag, so this change kick starts the fan for a change of 50% or more in the same way that starting the fan from 0% does. Signed-off-by: Justin Schuh <code@justinschuh.com>
* fan: Move M106/M107 commands from gcode.py to fan.pyKevin O'Connor2019-11-131-4/+19
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Add off_below option for fans (#1897)Nicholas Seckar2019-10-031-0/+4
| | | | | | | | Below off_below the fan will be turned off. When configured correctly this can prevent stalling, which may lead to overheating and failed fans. To simplify calibration and use of this setting, off_below is applied in the input duty cycle domain, prior to any scaling due to e.g. max_power. Signed-off-by: Nicholas Seckar <nseckar@gmail.com>
* Wrap code to 80 columnsKevin O'Connor2019-02-271-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* gcode: Use an event to handle restart request actionsKevin O'Connor2019-02-251-1/+6
| | | | | | | | Instead of directly turning off motors, heaters, and fans from gcode.py, raise a new event and allow the heater, fan, and toolhead to handle the event as needed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Allow the fan shutdown_speed to be configuredKevin O'Connor2018-05-181-3/+5
| | | | | | | Add a shutdown_speed config option to fans so that users can specify the speed on a shutdown event. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Add a set_shutdown_speed() methodKevin O'Connor2018-04-201-0/+2
| | | | | | | Add a set_shutdown_speed() method so that the heater_fan code does not need to peek into the fan object's internal members. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Scale fan speed requests between 0 and max_powerKevin O'Connor2018-04-201-1/+1
| | | | | | | | If the fan's max power is limited by the config, then scale speed requests between 0 and max_power. This makes more sense for typical g-code fan speeds. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Remove module level get_printer_pins() and setup_pin() functionsKevin O'Connor2018-04-041-3/+2
| | | | | | | | Most callers did a lookup of the pins module via printer.lookup_object("pins"). Use that as the standard method and remove these less frequently used methods. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Add initial support for LCD screens attached to an MCUKevin O'Connor2018-03-061-0/+2
| | | | | | | | Add support for displaying basic status information on ST7920 and HD44780 based LCDs that are attached directly to a micro-controller. Signed-off-by: Marcio Teixeira <marcio@alephobjects.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Introduce load_config_prefix() for modules that take parametersKevin O'Connor2018-02-031-2/+0
| | | | | | | | Use both load_config() and load_config_prefix() functions when dynamically loading a module from the extras directory - if the config section name has parameters in it then use load_config_prefix(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Clarify hardware_pwm and allow cycle_time to be set on software pwmKevin O'Connor2018-01-291-4/+4
| | | | | | | | Specify hardware pwm cycle times using the same method as software pwm (in seconds, not clock ticks). Allow the fan code to be configured with an explicit cycle time even when using software pwm. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Move fan code to extras directoryKevin O'Connor2018-01-281-0/+39
The print cooling fan and printer heater_fan are independent modules that can reside in the extras directory. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>