When you set PWM on a pin to a given value and then WRITE a 0 to it, the PWM timer does not stop. Set the PWM to 0 as well to prevent hotend meltdowns.

This commit is contained in:
Kliment 2011-08-02 21:47:32 +02:00
parent b3280f5adc
commit 96291e27a8

View file

@ -1421,6 +1421,7 @@ void manage_heater()
if(watch_raw + 1 >= current_raw){
target_raw = 0;
WRITE(HEATER_0_PIN,LOW);
analogWrite(HEATER_0_PIN, 0);
#if LED_PIN>-1
WRITE(LED_PIN,LOW);
#endif
@ -1452,6 +1453,7 @@ void manage_heater()
if(current_raw >= target_raw)
{
WRITE(HEATER_0_PIN,LOW);
analogWrite(HEATER_0_PIN, 0);
#if LED_PIN>-1
WRITE(LED_PIN,LOW);
#endif