|
|
@ -165,8 +165,13 @@ void lcd_status()
|
|
|
|
//previous_millis_buttons=millis();
|
|
|
|
//previous_millis_buttons=millis();
|
|
|
|
long ms=millis();
|
|
|
|
long ms=millis();
|
|
|
|
for(int8_t i=0; i<8; i++) {
|
|
|
|
for(int8_t i=0; i<8; i++) {
|
|
|
|
|
|
|
|
#ifndef NEWPANEL
|
|
|
|
if((blocking[i]>ms))
|
|
|
|
if((blocking[i]>ms))
|
|
|
|
buttons &= ~(1<<i);
|
|
|
|
buttons &= ~(1<<i);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
if((blocking>ms))
|
|
|
|
|
|
|
|
buttons &= ~(1<<i);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if((buttons==oldbuttons) && ((millis() - previous_millis_lcd) < LCD_UPDATE_INTERVAL) )
|
|
|
|
if((buttons==oldbuttons) && ((millis() - previous_millis_lcd) < LCD_UPDATE_INTERVAL) )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -326,14 +331,14 @@ void MainMenu::showStatus()
|
|
|
|
int tBed=intround(degBed());
|
|
|
|
int tBed=intround(degBed());
|
|
|
|
if((tBed!=oldtBed)||force_lcd_update)
|
|
|
|
if((tBed!=oldtBed)||force_lcd_update)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
lcd.setCursor(1,0);
|
|
|
|
lcd.setCursor(11,0);
|
|
|
|
lcd.print(ftostr3(tBed));
|
|
|
|
lcd.print(ftostr3(tBed));
|
|
|
|
oldtBed=tBed;
|
|
|
|
oldtBed=tBed;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int targetBed=intround(degTargetBed());
|
|
|
|
int targetBed=intround(degTargetBed());
|
|
|
|
if((targetBed!=oldtargetBed)||force_lcd_update)
|
|
|
|
if((targetBed!=oldtargetBed)||force_lcd_update)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
lcd.setCursor(5,0);
|
|
|
|
lcd.setCursor(15,0);
|
|
|
|
lcd.print(ftostr3(targetBed));
|
|
|
|
lcd.print(ftostr3(targetBed));
|
|
|
|
oldtargetBed=targetBed;
|
|
|
|
oldtargetBed=targetBed;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -352,11 +357,11 @@ void MainMenu::showStatus()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static int oldzpos=0;
|
|
|
|
static int oldzpos=0;
|
|
|
|
int currentz=current_position[2]*10;
|
|
|
|
int currentz=current_position[2]*100;
|
|
|
|
if((currentz!=oldzpos)||force_lcd_update)
|
|
|
|
if((currentz!=oldzpos)||force_lcd_update)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
lcd.setCursor(10,1);
|
|
|
|
lcd.setCursor(10,1);
|
|
|
|
lcdprintPGM("Z:");lcd.print(itostr31(currentz));
|
|
|
|
lcdprintPGM("Z:");lcd.print(ftostr32(current_position[2]));
|
|
|
|
oldzpos=currentz;
|
|
|
|
oldzpos=currentz;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
static int oldfeedmultiply=0;
|
|
|
|
static int oldfeedmultiply=0;
|
|
|
@ -490,7 +495,11 @@ void MainMenu::showPrepare()
|
|
|
|
updateActiveLines(ItemP_extrude,encoderpos);
|
|
|
|
updateActiveLines(ItemP_extrude,encoderpos);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,ItemT_fan};
|
|
|
|
enum {ItemT_exit,ItemT_speed,ItemT_flow,ItemT_nozzle,
|
|
|
|
|
|
|
|
#if (HEATER_BED_PIN > -1)
|
|
|
|
|
|
|
|
ItemT_bed,
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
ItemT_fan};
|
|
|
|
|
|
|
|
|
|
|
|
void MainMenu::showTune()
|
|
|
|
void MainMenu::showTune()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -572,6 +581,42 @@ void MainMenu::showTune()
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}break;
|
|
|
|
}break;
|
|
|
|
|
|
|
|
#if (HEATER_BED_PIN > -1)
|
|
|
|
|
|
|
|
case ItemT_bed:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(force_lcd_update)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(" \002Bed:");
|
|
|
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetBed())));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) )
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
linechanging=!linechanging;
|
|
|
|
|
|
|
|
if(linechanging)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
encoderpos=intround(degTargetBed());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
setTargetBed(encoderpos);
|
|
|
|
|
|
|
|
encoderpos=activeline*lcdslow;
|
|
|
|
|
|
|
|
beepshort();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BLOCK;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(linechanging)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(encoderpos<0) encoderpos=0;
|
|
|
|
|
|
|
|
if(encoderpos>260) encoderpos=260;
|
|
|
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}break;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case ItemT_fan:
|
|
|
|
case ItemT_fan:
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -676,6 +721,9 @@ enum {
|
|
|
|
#ifdef AUTOTEMP
|
|
|
|
#ifdef AUTOTEMP
|
|
|
|
ItemCT_autotempactive,
|
|
|
|
ItemCT_autotempactive,
|
|
|
|
ItemCT_autotempmin,ItemCT_autotempmax,ItemCT_autotempfact,
|
|
|
|
ItemCT_autotempmin,ItemCT_autotempmax,ItemCT_autotempfact,
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if (HEATER_BED_PIN > -1)
|
|
|
|
|
|
|
|
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
|
|
|
@ -857,6 +905,41 @@ void MainMenu::showControlTemp()
|
|
|
|
|
|
|
|
|
|
|
|
}break;
|
|
|
|
}break;
|
|
|
|
#endif //autotemp
|
|
|
|
#endif //autotemp
|
|
|
|
|
|
|
|
#if (HEATER_BED_PIN > -1)
|
|
|
|
|
|
|
|
case ItemCT_bed:
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(force_lcd_update)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
lcd.setCursor(0,line);lcdprintPGM(" \002Bed:");
|
|
|
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetBed())));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if((activeline!=line) )
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(CLICKED)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
linechanging=!linechanging;
|
|
|
|
|
|
|
|
if(linechanging)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
encoderpos=intround(degTargetBed());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
setTargetBed(encoderpos);
|
|
|
|
|
|
|
|
encoderpos=activeline*lcdslow;
|
|
|
|
|
|
|
|
beepshort();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BLOCK;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(linechanging)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if(encoderpos<0) encoderpos=0;
|
|
|
|
|
|
|
|
if(encoderpos>260) encoderpos=260;
|
|
|
|
|
|
|
|
lcd.setCursor(13,line);lcd.print(itostr3(encoderpos));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}break;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
case ItemCT_fan:
|
|
|
|
case ItemCT_fan:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if(force_lcd_update)
|
|
|
|
if(force_lcd_update)
|
|
|
|