merged SBUBA82 and Justblair

This commit is contained in:
Erik van der Zalm
2012-02-21 20:26:59 +01:00
15 changed files with 1520 additions and 75 deletions

View File

@@ -122,7 +122,7 @@ void lcd_init()
lcd.createChar(3,uplevel);
lcd.createChar(4,refresh);
lcd.createChar(5,folder);
LCD_MESSAGEPGM("UltiMarlin ready.");
LCD_MESSAGEPGM(WELCOME_MSG);
}
@@ -476,25 +476,25 @@ void MainMenu::showPrepare()
switch(i)
{
case ItemP_exit:
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_MAIN) , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
case ItemP_autostart:
MENUITEM( lcdprintPGM(" Autostart") , BLOCK;card.lastnr=0;card.setroot();card.checkautostart(true);beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_AUTOSTART) , BLOCK;card.lastnr=0;card.setroot();card.checkautostart(true);beepshort(); ) ;
break;
case ItemP_disstep:
MENUITEM( lcdprintPGM(" Disable Steppers") , BLOCK;enquecommand("M84");beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_DISABLE_STEPPERS) , BLOCK;enquecommand("M84");beepshort(); ) ;
break;
case ItemP_home:
MENUITEM( lcdprintPGM(" Auto Home") , BLOCK;enquecommand("G28 X0 Y0 Z0");beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_AUTO_HOME) , BLOCK;enquecommand("G28 X-105 Y-105 Z0");beepshort(); ) ;
break;
case ItemP_origin:
MENUITEM( lcdprintPGM(" Set Origin") , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_SET_ORIGIN) , BLOCK;enquecommand("G92 X0 Y0 Z0");beepshort(); ) ;
break;
case ItemP_preheat:
MENUITEM( lcdprintPGM(" Preheat") , BLOCK;setTargetHotend0(227);setTargetBed(105);beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_PREHEAT) , BLOCK;setTargetHotend0(170);setTargetBed(70);beepshort(); ) ;
break;
case ItemP_cooldown:
MENUITEM( lcdprintPGM(" Cooldown") , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_COOLDOWN) , BLOCK;setTargetHotend0(0);setTargetBed(0);beepshort(); ) ;
break;
// case ItemP_extrude:
// MENUITEM( lcdprintPGM(" Extrude") , BLOCK;enquecommand("G92 E0");enquecommand("G1 F700 E50");beepshort(); ) ;
@@ -690,13 +690,13 @@ void MainMenu::showTune()
switch(i)
{
case ItemT_exit:
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_MAIN) , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
case ItemT_speed:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Speed:");
lcd.setCursor(0,line);lcdprintPGM(MSG_SPEED);
lcd.setCursor(13,line);lcd.print(ftostr3(feedmultiply));
}
@@ -731,7 +731,7 @@ void MainMenu::showTune()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002Nozzle:");
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend0())));
}
@@ -765,7 +765,7 @@ void MainMenu::showTune()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002Bed:");
lcd.setCursor(0,line);lcdprintPGM(MSG_BED);
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetBed())));
}
@@ -836,7 +836,7 @@ void MainMenu::showTune()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Flow:");
lcd.setCursor(0,line);lcdprintPGM(MSG_FLOW);
lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[3]));
}
@@ -917,13 +917,13 @@ void MainMenu::showControlTemp()
switch(i)
{
case ItemCT_exit:
MENUITEM( lcdprintPGM(" Control \003") , BLOCK;status=Main_Control;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_CONTROL) , BLOCK;status=Main_Control;beepshort(); ) ;
break;
case ItemCT_nozzle:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002Nozzle:");
lcd.setCursor(0,line);lcdprintPGM(MSG_NOZZLE);
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetHotend0())));
}
@@ -958,7 +958,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002 Min:");
lcd.setCursor(0,line);lcdprintPGM(MSG_MIN);
lcd.setCursor(13,line);lcd.print(ftostr3(autotemp_min));
}
@@ -992,7 +992,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002 Max:");
lcd.setCursor(0,line);lcdprintPGM(MSG_MAX);
lcd.setCursor(13,line);lcd.print(ftostr3(autotemp_max));
}
@@ -1026,7 +1026,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002 Fact:");
lcd.setCursor(0,line);lcdprintPGM(MSG_FACTOR);
lcd.setCursor(13,line);lcd.print(ftostr32(autotemp_factor));
}
@@ -1060,12 +1060,12 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Autotemp:");
lcd.setCursor(0,line);lcdprintPGM(MSG_AUTOTEMP);
lcd.setCursor(13,line);
if(autotemp_enabled)
lcdprintPGM("On");
lcdprintPGM(MSG_ON);
else
lcdprintPGM("Off");
lcdprintPGM(MSG_OFF);
}
if((activeline!=line) )
@@ -1076,9 +1076,9 @@ void MainMenu::showControlTemp()
autotemp_enabled=!autotemp_enabled;
lcd.setCursor(13,line);
if(autotemp_enabled)
lcdprintPGM("On ");
lcdprintPGM(MSG_ON);
else
lcdprintPGM("Off");
lcdprintPGM(MSG_OFF);
BLOCK;
}
@@ -1089,7 +1089,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" \002Bed:");
lcd.setCursor(0,line);lcdprintPGM(MSG_BED);
lcd.setCursor(13,line);lcd.print(ftostr3(intround(degTargetBed())));
}
@@ -1123,7 +1123,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Fan speed:");
lcd.setCursor(0,line);lcdprintPGM(MSG_FAN_SPEED);
lcd.setCursor(13,line);lcd.print(ftostr3(fanpwm));
}
@@ -1193,7 +1193,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" PID-I: ");
lcd.setCursor(0,line);lcdprintPGM(MSG_PID_I);
lcd.setCursor(13,line);lcd.print(ftostr51(Ki/PID_dT));
}
@@ -1228,7 +1228,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" PID-D: ");
lcd.setCursor(0,line);lcdprintPGM(MSG_PID_D);
lcd.setCursor(13,line);lcd.print(itostr4(Kd*PID_dT));
}
@@ -1265,7 +1265,7 @@ void MainMenu::showControlTemp()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" PID-C: ");
lcd.setCursor(0,line);lcdprintPGM(MSG_PID_C);
lcd.setCursor(13,line);lcd.print(itostr3(Kc));
}
@@ -1331,13 +1331,13 @@ void MainMenu::showControlMotion()
switch(i)
{
case ItemCM_exit:
MENUITEM( lcdprintPGM(" Control \003") , BLOCK;status=Main_Control;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_CONTROL) , BLOCK;status=Main_Control;beepshort(); ) ;
break;
case ItemCM_acc:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Acc:");
lcd.setCursor(0,line);lcdprintPGM(MSG_ACC);
lcd.setCursor(13,line);lcd.print(itostr3(acceleration/100));lcdprintPGM("00");
}
@@ -1371,7 +1371,7 @@ void MainMenu::showControlMotion()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Vxy-jerk: ");
lcd.setCursor(0,line);lcdprintPGM(MSG_VXY_JERK);
lcd.setCursor(13,line);lcd.print(itostr3(max_xy_jerk));
}
@@ -1410,11 +1410,11 @@ void MainMenu::showControlMotion()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Vmax ");
if(i==ItemCM_vmaxx)lcdprintPGM("x:");
if(i==ItemCM_vmaxy)lcdprintPGM("y:");
if(i==ItemCM_vmaxz)lcdprintPGM("z:");
if(i==ItemCM_vmaxe)lcdprintPGM("e:");
lcd.setCursor(0,line);lcdprintPGM(MSG_VMAX);
if(i==ItemCM_vmaxx)lcdprintPGM(MSG_X);
if(i==ItemCM_vmaxy)lcdprintPGM(MSG_Y);
if(i==ItemCM_vmaxz)lcdprintPGM(MSG_Z);
if(i==ItemCM_vmaxe)lcdprintPGM(MSG_E);
lcd.setCursor(13,line);lcd.print(itostr3(max_feedrate[i-ItemCM_vmaxx]));
}
@@ -1450,7 +1450,7 @@ void MainMenu::showControlMotion()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Vmin:");
lcd.setCursor(0,line);lcdprintPGM(MSG_VMIN);
lcd.setCursor(13,line);lcd.print(itostr3(minimumfeedrate));
}
@@ -1485,7 +1485,7 @@ void MainMenu::showControlMotion()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" VTrav min:");
lcd.setCursor(0,line);lcdprintPGM(MSG_VTRAV_MIN);
lcd.setCursor(13,line);lcd.print(itostr3(mintravelfeedrate));
}
@@ -1525,10 +1525,10 @@ void MainMenu::showControlMotion()
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Amax ");
if(i==ItemCM_amaxx)lcdprintPGM("x:");
if(i==ItemCM_amaxy)lcdprintPGM("y:");
if(i==ItemCM_amaxz)lcdprintPGM("z:");
if(i==ItemCM_amaxe)lcdprintPGM("e:");
if(i==ItemCM_amaxx)lcdprintPGM(MSG_X);
if(i==ItemCM_amaxy)lcdprintPGM(MSG_Y);
if(i==ItemCM_amaxz)lcdprintPGM(MSG_Z);
if(i==ItemCM_amaxe)lcdprintPGM(MSG_E);
lcd.setCursor(13,line);lcd.print(itostr3(max_acceleration_units_per_sq_second[i-ItemCM_amaxx]/100));lcdprintPGM("00");
}
@@ -1562,7 +1562,7 @@ void MainMenu::showControlMotion()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" A-retract:");
lcd.setCursor(0,line);lcdprintPGM(MSG_A_RETRACT);
lcd.setCursor(13,line);lcd.print(ftostr3(retract_acceleration/100));lcdprintPGM("00");
}
@@ -1712,7 +1712,7 @@ void MainMenu::showControlMotion()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" E steps/mm:");
lcd.setCursor(0,line);lcdprintPGM(MSG_ESTEPS);
lcd.setCursor(13,line);lcd.print(itostr4(axis_steps_per_unit[3]));
}
@@ -1769,19 +1769,19 @@ void MainMenu::showControl()
switch(i)
{
case ItemC_exit:
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_MAIN_WIDE) , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
case ItemC_temp:
MENUITEM( lcdprintPGM(" Temperature \x7E") , BLOCK;status=Sub_TempControl;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_TEMPERATURE_WIDE) , BLOCK;status=Sub_TempControl;beepshort(); ) ;
break;
case ItemC_move:
MENUITEM( lcdprintPGM(" Motion \x7E") , BLOCK;status=Sub_MotionControl;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_MOTION_WIDE) , BLOCK;status=Sub_MotionControl;beepshort(); ) ;
break;
case ItemC_store:
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Store EPROM");
lcd.setCursor(0,line);lcdprintPGM(MSG_STORE_EPROM);
}
if((activeline==line) && CLICKED)
{
@@ -1795,7 +1795,7 @@ void MainMenu::showControl()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Load EPROM");
lcd.setCursor(0,line);lcdprintPGM(MSG_LOAD_EPROM);
}
if((activeline==line) && CLICKED)
{
@@ -1809,7 +1809,7 @@ void MainMenu::showControl()
{
if(force_lcd_update)
{
lcd.setCursor(0,line);lcdprintPGM(" Restore Failsafe");
lcd.setCursor(0,line);lcdprintPGM(MSG_RESTORE_FAILSAFE);
}
if((activeline==line) && CLICKED)
{
@@ -1856,7 +1856,7 @@ void MainMenu::showSD()
switch(i)
{
case 0:
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_MAIN) , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
// case 1:
// {
@@ -1887,7 +1887,7 @@ void MainMenu::showSD()
// }
// }break;
case 1:
MENUITEM( lcd.print(" ");card.getWorkDirName();if(card.filename[0]=='/') lcdprintPGM("\004Refresh");else {lcd.print("\005");lcd.print(card.filename);lcd.print("/..");} , BLOCK;card.updir();enforceupdate=true;lineoffset=0;beepshort(); ) ;
MENUITEM( lcd.print(" ");card.getWorkDirName();if(card.filename[0]=='/') lcdprintPGM(MSG_REFRESH);else {lcd.print("\005");lcd.print(card.filename);lcd.print("/..");} , BLOCK;card.updir();enforceupdate=true;lineoffset=0;beepshort(); ) ;
break;
default:
@@ -1974,14 +1974,14 @@ void MainMenu::showMainMenu()
switch(line)
{
case ItemM_watch:
MENUITEM( lcdprintPGM(" Watch \003") , BLOCK;status=Main_Status;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_WATCH) , BLOCK;status=Main_Status;beepshort(); ) ;
break;
case ItemM_prepare:
MENUITEM( if(!tune) lcdprintPGM(" Prepare \x7E");else lcdprintPGM(" Tune \x7E"); , BLOCK;status=Main_Prepare;beepshort(); ) ;
MENUITEM( if(!tune) lcdprintPGM(MSG_PREPARE);else lcdprintPGM(MSG_TUNE); , BLOCK;status=Main_Prepare;beepshort(); ) ;
break;
case ItemM_control:
MENUITEM( lcdprintPGM(" Control \x7E") , BLOCK;status=Main_Control;beepshort(); ) ;
MENUITEM( lcdprintPGM(MSG_CONTROL_ARROW) , BLOCK;status=Main_Control;beepshort(); ) ;
break;
#ifdef SDSUPPORT
case ItemM_file:
@@ -1996,13 +1996,13 @@ void MainMenu::showMainMenu()
#endif
{
if(card.sdprinting)
lcdprintPGM(" Stop Print \x7E");
lcdprintPGM(MSG_STOP_PRINT);
else
lcdprintPGM(" Card Menu \x7E");
lcdprintPGM(MSG_CARD_MENU);
}
else
{
lcdprintPGM(" No Card");
lcdprintPGM(MSG_NO_CARD);
}
}
#ifdef CARDINSERTED
@@ -2022,7 +2022,7 @@ void MainMenu::showMainMenu()
#endif
default:
SERIAL_ERROR_START;
SERIAL_ERRORLNPGM("Something is wrong in the MenuStructure.");
SERIAL_ERRORLNPGM(MSG_SERIAL_ERROR_MENU_STRUCTURE);
break;
}
}
@@ -2043,12 +2043,12 @@ void MainMenu::update()
if(CARDINSERTED)
{
card.initsd();
LCD_MESSAGEPGM("Card inserted");
LCD_MESSAGEPGM(MSG_SD_INSERTED);
}
else
{
card.release();
LCD_MESSAGEPGM("Card removed");
LCD_MESSAGEPGM(MSG_SD_REMOVED);
}
}
#endif