|
@ -534,17 +534,17 @@ void MainMenu::showPrepare() |
|
|
MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ; |
|
|
MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ; |
|
|
break; |
|
|
break; |
|
|
case ItemP_preheat_pla: |
|
|
case ItemP_preheat_pla: |
|
|
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(PLA_PREHEAT_HOTEND_TEMP);setTargetBed(PLA_PREHEAT_HPB_TEMP); |
|
|
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA) , BLOCK;setTargetHotend0(plaPreheatHotendTemp);setTargetBed(plaPreheatHPBTemp); |
|
|
#if FAN_PIN > -1 |
|
|
#if FAN_PIN > -1 |
|
|
FanSpeed=PLA_PREHEAT_FAN_SPEED; |
|
|
FanSpeed = plaPreheatFanSpeed; |
|
|
analogWrite(FAN_PIN, FanSpeed); |
|
|
analogWrite(FAN_PIN, FanSpeed); |
|
|
#endif |
|
|
#endif |
|
|
beepshort(); ); |
|
|
beepshort(); ); |
|
|
break; |
|
|
break; |
|
|
case ItemP_preheat_abs: |
|
|
case ItemP_preheat_abs: |
|
|
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(ABS_PREHEAT_HOTEND_TEMP);setTargetBed(ABS_PREHEAT_HPB_TEMP); |
|
|
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS) , BLOCK;setTargetHotend0(absPreheatHotendTemp);setTargetBed(absPreheatHPBTemp); |
|
|
#if FAN_PIN > -1 |
|
|
#if FAN_PIN > -1 |
|
|
FanSpeed=ABS_PREHEAT_FAN_SPEED; |
|
|
FanSpeed = absPreheatFanSpeed; |
|
|
analogWrite(FAN_PIN, FanSpeed); |
|
|
analogWrite(FAN_PIN, FanSpeed); |
|
|
#endif |
|
|
#endif |
|
|
beepshort(); ); |
|
|
beepshort(); ); |
|
@ -973,7 +973,9 @@ enum { |
|
|
ItemCT_bed, |
|
|
ItemCT_bed, |
|
|
#endif |
|
|
#endif |
|
|
ItemCT_fan, |
|
|
ItemCT_fan, |
|
|
ItemCT_PID_P,ItemCT_PID_I,ItemCT_PID_D,ItemCT_PID_C |
|
|
ItemCT_PID_P,ItemCT_PID_I,ItemCT_PID_D,ItemCT_PID_C, |
|
|
|
|
|
ItemCT_PLA_PreHeat_Setting, |
|
|
|
|
|
ItemCT_ABS_PreHeat_Setting, |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
void MainMenu::showControlTemp() |
|
|
void MainMenu::showControlTemp() |
|
@ -1440,16 +1442,19 @@ void MainMenu::showControlTemp() |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
break; |
|
|
break; |
|
|
|
|
|
case ItemCT_PLA_PreHeat_Setting: |
|
|
|
|
|
MENUITEM( lcdprintPGM(MSG_PREHEAT_PLA_SETTINGS) , BLOCK;status=Sub_PreheatPLASettings;beepshort(); ) ; |
|
|
|
|
|
break; |
|
|
|
|
|
case ItemCT_ABS_PreHeat_Setting: |
|
|
|
|
|
MENUITEM( lcdprintPGM(MSG_PREHEAT_ABS_SETTINGS) , BLOCK;status=Sub_PreheatABSSettings;beepshort(); ) ; |
|
|
|
|
|
break; |
|
|
default: |
|
|
default: |
|
|
break; |
|
|
break; |
|
|
} |
|
|
} |
|
|
line++; |
|
|
line++; |
|
|
} |
|
|
} |
|
|
#ifdef PID_ADD_EXTRUSION_RATE |
|
|
|
|
|
updateActiveLines(ItemCT_PID_C,encoderpos); |
|
|
updateActiveLines(ItemCT_ABS_PreHeat_Setting,encoderpos); |
|
|
#else |
|
|
|
|
|
updateActiveLines(ItemCT_PID_D,encoderpos); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2575,6 +2580,14 @@ void MainMenu::update() |
|
|
{ |
|
|
{ |
|
|
showSD(); |
|
|
showSD(); |
|
|
}break; |
|
|
}break; |
|
|
|
|
|
case Sub_PreheatPLASettings: |
|
|
|
|
|
{ |
|
|
|
|
|
showPLAsettings(); |
|
|
|
|
|
}break; |
|
|
|
|
|
case Sub_PreheatABSSettings: |
|
|
|
|
|
{ |
|
|
|
|
|
showABSsettings(); |
|
|
|
|
|
}break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(timeoutToStatus<millis()) |
|
|
if(timeoutToStatus<millis()) |
|
@ -2583,11 +2596,299 @@ void MainMenu::update() |
|
|
lastencoderpos=encoderpos; |
|
|
lastencoderpos=encoderpos; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum { |
|
|
|
|
|
ItemPLAPreHeat_Exit, |
|
|
|
|
|
ItemPLAPreHeat_set_PLA_FanSpeed, |
|
|
|
|
|
ItemPLAPreHeat_set_nozzle, |
|
|
|
|
|
ItemPLAPreHeat_set_HPB, |
|
|
|
|
|
ItemPLAPreHeat_Store_Eprom |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
void MainMenu::showPLAsettings() |
|
|
|
|
|
{ |
|
|
|
|
|
#ifdef ULTIPANEL |
|
|
|
|
|
uint8_t line=0; |
|
|
|
|
|
clearIfNecessary(); |
|
|
|
|
|
for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++) |
|
|
|
|
|
{ |
|
|
|
|
|
switch(i) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
case ItemPLAPreHeat_Exit: |
|
|
|
|
|
MENUITEM( lcdprintPGM(MSG_TEMPERATURE_RTN) , BLOCK;status=Sub_TempControl;beepshort(); ) ; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case ItemPLAPreHeat_set_PLA_FanSpeed: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED); |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatFanSpeed)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) ) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
linechanging=!linechanging; |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=plaPreheatFanSpeed; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=activeline*lcdslow; |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
} |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
} |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
if(encoderpos<0) encoderpos=0; |
|
|
|
|
|
if(encoderpos>255) encoderpos=255; |
|
|
|
|
|
plaPreheatFanSpeed=encoderpos; |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos)); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
|
|
|
|
|
|
case ItemPLAPreHeat_set_nozzle: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE); |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatHotendTemp)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) ) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
linechanging=!linechanging; |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=plaPreheatHotendTemp; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=activeline*lcdslow; |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
} |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
} |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
if(encoderpos<0) encoderpos=0; |
|
|
|
|
|
if(encoderpos>260) encoderpos=260; |
|
|
|
|
|
plaPreheatHotendTemp = encoderpos; |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos)); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
|
|
|
|
|
|
case ItemPLAPreHeat_set_HPB: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_BED); |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(plaPreheatHPBTemp)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) ) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
linechanging=!linechanging; |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=plaPreheatHPBTemp; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=activeline*lcdslow; |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
} |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
} |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
if(encoderpos<0) encoderpos=0; |
|
|
|
|
|
if(encoderpos>250) encoderpos=150; |
|
|
|
|
|
plaPreheatHPBTemp = encoderpos; |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos)); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
case ItemPLAPreHeat_Store_Eprom: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM); |
|
|
|
|
|
} |
|
|
|
|
|
if((activeline==line) && CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
//enquecommand("M84"); |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
EEPROM_StoreSettings(); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
default: |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
line++; |
|
|
|
|
|
} |
|
|
|
|
|
updateActiveLines(ItemPLAPreHeat_Store_Eprom,encoderpos); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
enum { |
|
|
|
|
|
ItemABSPreHeat_Exit, |
|
|
|
|
|
ItemABSPreHeat_set_FanSpeed, |
|
|
|
|
|
ItemABSPreHeat_set_nozzle, |
|
|
|
|
|
ItemABSPreHeat_set_HPB, |
|
|
|
|
|
ItemABSPreHeat_Store_Eprom |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
void MainMenu::showABSsettings() |
|
|
|
|
|
{ |
|
|
|
|
|
#ifdef ULTIPANEL |
|
|
|
|
|
uint8_t line=0; |
|
|
|
|
|
clearIfNecessary(); |
|
|
|
|
|
for(int8_t i=lineoffset;i<lineoffset+LCD_HEIGHT;i++) |
|
|
|
|
|
{ |
|
|
|
|
|
switch(i) |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
case ItemABSPreHeat_Exit: |
|
|
|
|
|
MENUITEM( lcdprintPGM(MSG_TEMPERATURE_RTN) , BLOCK;status=Sub_TempControl;beepshort(); ) ; |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
case ItemABSPreHeat_set_FanSpeed: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED); |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatFanSpeed)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) ) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
linechanging=!linechanging; |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=absPreheatFanSpeed; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=activeline*lcdslow; |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
} |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
} |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
if(encoderpos<0) encoderpos=0; |
|
|
|
|
|
if(encoderpos>255) encoderpos=255; |
|
|
|
|
|
absPreheatFanSpeed=encoderpos; |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos)); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
|
|
|
|
|
|
case ItemABSPreHeat_set_nozzle: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE); |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatHotendTemp)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) ) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
linechanging=!linechanging; |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=absPreheatHotendTemp; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=activeline*lcdslow; |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
} |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
} |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
if(encoderpos<0) encoderpos=0; |
|
|
|
|
|
if(encoderpos>260) encoderpos=260; |
|
|
|
|
|
absPreheatHotendTemp = encoderpos; |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos)); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
|
|
|
|
|
|
case ItemABSPreHeat_set_HPB: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_BED); |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(absPreheatHPBTemp)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) ) |
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
linechanging=!linechanging; |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=absPreheatHPBTemp; |
|
|
|
|
|
} |
|
|
|
|
|
else |
|
|
|
|
|
{ |
|
|
|
|
|
encoderpos=activeline*lcdslow; |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
} |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
} |
|
|
|
|
|
if(linechanging) |
|
|
|
|
|
{ |
|
|
|
|
|
if(encoderpos<0) encoderpos=0; |
|
|
|
|
|
if(encoderpos>250) encoderpos=150; |
|
|
|
|
|
absPreheatHPBTemp = encoderpos; |
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos)); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
case ItemABSPreHeat_Store_Eprom: |
|
|
|
|
|
{ |
|
|
|
|
|
if(force_lcd_update) |
|
|
|
|
|
{ |
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM); |
|
|
|
|
|
} |
|
|
|
|
|
if((activeline==line) && CLICKED) |
|
|
|
|
|
{ |
|
|
|
|
|
//enquecommand("M84"); |
|
|
|
|
|
beepshort(); |
|
|
|
|
|
BLOCK; |
|
|
|
|
|
EEPROM_StoreSettings(); |
|
|
|
|
|
} |
|
|
|
|
|
}break; |
|
|
|
|
|
default: |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
|
|
|
line++; |
|
|
|
|
|
} |
|
|
|
|
|
updateActiveLines(ItemABSPreHeat_Store_Eprom,encoderpos); |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//********************************************************************************************************** |
|
|
// convert float to string with +123.4 format |
|
|
// convert float to string with +123.4 format |
|
|
char *ftostr3(const float &x) |
|
|
char *ftostr3(const float &x) |
|
|
{ |
|
|
{ |
|
|