diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-03-08 20:00:27 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-03-08 20:23:09 -0500 |
commit | bcaf818c0e2bc6b92a579318b9ac97911d0104bf (patch) | |
tree | 50ce5f15e290ea56a9d1658f9ef834bff64af9a7 /klippy/heater.py | |
parent | 37bac916e7dd7159fe731f313859e31e743f7f23 (diff) | |
download | kutter-bcaf818c0e2bc6b92a579318b9ac97911d0104bf.tar.gz kutter-bcaf818c0e2bc6b92a579318b9ac97911d0104bf.tar.xz kutter-bcaf818c0e2bc6b92a579318b9ac97911d0104bf.zip |
fan: Default to using software PWM
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>
Diffstat (limited to 'klippy/heater.py')
-rw-r--r-- | klippy/heater.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/klippy/heater.py b/klippy/heater.py index 77cb659f..66d2db91 100644 --- a/klippy/heater.py +++ b/klippy/heater.py @@ -16,6 +16,7 @@ Thermistors = { SAMPLE_TIME = 0.001 SAMPLE_COUNT = 8 REPORT_TIME = 0.300 +PWM_CYCLE_TIME = 0.100 KELVIN_TO_CELCIUS = -273.15 MAX_HEAT_TIME = 5.0 AMBIENT_TEMP = 25. @@ -55,7 +56,7 @@ class PrinterHeater: heater_pin, MAX_HEAT_TIME) else: self.mcu_pwm = self.printer.mcu.create_pwm( - heater_pin, 0, MAX_HEAT_TIME) + heater_pin, PWM_CYCLE_TIME, 0, MAX_HEAT_TIME) self.mcu_adc = self.printer.mcu.create_adc(thermistor_pin) min_adc = self.calc_adc(self.max_temp) max_adc = self.calc_adc(self.min_temp) |