Added FAN_PIN -1 checks
This commit is contained in:
parent
87c4e06c24
commit
61e09e6be2
@ -437,13 +437,17 @@ void check_axes_activity() {
|
||||
}
|
||||
}
|
||||
else {
|
||||
#if FAN_PIN > -1
|
||||
if (FanSpeed != 0) analogWrite(FAN_PIN,FanSpeed); // If buffer is empty use current fan speed
|
||||
#endif
|
||||
}
|
||||
if((DISABLE_X) && (x_active == 0)) disable_x();
|
||||
if((DISABLE_Y) && (y_active == 0)) disable_y();
|
||||
if((DISABLE_Z) && (z_active == 0)) disable_z();
|
||||
if((DISABLE_E) && (e_active == 0)) { disable_e0();disable_e1();disable_e2(); }
|
||||
#if FAN_PIN > -1
|
||||
if((FanSpeed == 0) && (fan_speed ==0)) analogWrite(FAN_PIN, 0);
|
||||
#endif
|
||||
if (FanSpeed != 0 && tail_fan_speed !=0) {
|
||||
analogWrite(FAN_PIN,tail_fan_speed);
|
||||
}
|
||||
|
@ -505,10 +505,18 @@ void MainMenu::showPrepare()
|
||||
MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
|
||||
break;
|
||||
case ItemP_preheat_pla:
|
||||
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(PLA_PREHEAT_HOTEND_TEMP);setTargetBed(PLA_PREHEAT_HPB_TEMP);analogWrite(FAN_PIN, PLA_PREHEAT_FAN_SPEED); beepshort(); ) ;
|
||||
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(PLA_PREHEAT_HOTEND_TEMP);setTargetBed(PLA_PREHEAT_HPB_TEMP);
|
||||
#if FAN_PIN > -1
|
||||
analogWrite(FAN_PIN, PLA_PREHEAT_FAN_SPEED);
|
||||
#endif
|
||||
beepshort(); );
|
||||
break;
|
||||
case ItemP_preheat_abs:
|
||||
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(ABS_PREHEAT_HOTEND_TEMP);setTargetBed(ABS_PREHEAT_HPB_TEMP); analogWrite(FAN_PIN, ABS_PREHEAT_FAN_SPEED); beepshort(); ) ;
|
||||
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(ABS_PREHEAT_HOTEND_TEMP);setTargetBed(ABS_PREHEAT_HPB_TEMP);
|
||||
#if FAN_PIN > -1
|
||||
analogWrite(FAN_PIN, ABS_PREHEAT_FAN_SPEED);
|
||||
#endif
|
||||
beepshort(); );
|
||||
break;
|
||||
case ItemP_cooldown:
|
||||
MENUITEM( lcdprintPGM(MSG_COOLDOWN) , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
|
||||
|
Loading…
Reference in New Issue
Block a user