aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/fan.py
Commit message (Collapse)AuthorAgeFilesLines
* mcu: Allow both shutdown and startup values to be set for output pinsKevin O'Connor2017-12-181-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Enable heater_fan objects on an MCU shutdown eventKevin O'Connor2017-10-121-1/+5
| | | | | | | Should the MCU go into an error state, set the heater_fan to max_power. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* adccmds: Continue to query analog inputs after a shutdownKevin O'Connor2017-10-121-1/+1
| | | | | | | | Continue to sample the ADC input pins even if the MCU goes into a shutdown state. This enables the printer to continue reporting temperatures even on an mcu error. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Pass print_time directly to MCU callsKevin O'Connor2017-09-191-10/+6
| | | | | | | | | Now that the print_time is always synchronized with the mcu_time, there is no longer a need to track mcu_time as a separate quantity. Eliminate references to mcu_time from the code and pass print_time directly in its place. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* toolhead: Synchronize print_time to main mcu's timeKevin O'Connor2017-09-191-3/+3
| | | | | | | | Instead of starting the print_time at zero, start it at the estimated time of the main mcu's clock. This simplifies the code and it ensures that print_time never goes backwards. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Allow heater_fan to work with heater_bedKevin O'Connor2017-09-071-2/+0
| | | | | | | Fix order of init error preventing heater_fan from being used with heater_bed. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Add get_mcu() call to the mcu oid objectsKevin O'Connor2017-08-291-2/+3
| | | | | | | | | Allow external code to obtain the mcu object that controls a pin setup with setup_pin(). Also, don't bother defining print_to_mcu_time() and system_to_mcu_time() on each pin object as they can be obtained via the new get_mcu() method. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Support registering arbitrary chips that supply configurable pinsKevin O'Connor2017-08-251-5/+5
| | | | | | | | | Allow multiple chips to provide pin mappings (not just the main mcu chip). Move the pin parsing from the mcu.py code to pins.py and support mapping from pin descriptions to their corresponding chips and parameters. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Add support for heater_fan objectsKevin O'Connor2017-07-171-4/+31
| | | | | | | Add support for fans designed to cool the components of an extruder or heater. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Support setting a max_power attribute for the print cooling fanKevin O'Connor2017-07-051-3/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Allow each module to define their config sectionsKevin O'Connor2017-06-091-0/+4
| | | | | | | | Create add_printer_objects() functions in the fan, heater, extruder, and toolhead modules. Create the necessary printer component objects from this call instead of placing the code directly in klippy.py. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Support minimum/maximum value checks on configuration variablesKevin O'Connor2017-04-111-1/+1
| | | | | | | Verify that numeric parameters are in a sane range when reading the config. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* klippy: Eliminate high-level build_config phaseKevin O'Connor2017-03-131-8/+3
| | | | | | | | | | Now that the mcu objects can be created prior to connecting to the mcu, it is no longer necessary to separate the init and build_config phases in the high-level code. Move the mcu objection creation from the build_config phase to the init phase and eliminate the build_config phase. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* fan: Default to using software PWMKevin O'Connor2017-03-081-2/+4
| | | | | | | Not all hardware has PWM support and there is no compelling reason to use hardware PWM for fans. Change the default to use software PWM. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* heater: Support max_power setting for heatersKevin O'Connor2017-03-031-4/+4
| | | | | | | | Change the mcu PWM value from an integer (0-255) to a float (0. - 1.). Add support for limiting the maximum power (as measured over a sufficiently long duration) to a particular heater. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Convert PWM and ADC objects to take mcu_time instead of clockKevin O'Connor2016-08-241-14/+10
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Initial commit of source code.Kevin O'Connor2016-05-251-0/+39
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>