Browse Source

overworked ultralcd a bit

Bernhard 13 years ago
parent
commit
c54a807824
2 changed files with 10 additions and 9 deletions
  1. 1
    0
      Marlin/cardreader.h
  2. 9
    9
      Marlin/ultralcd.pde

+ 1
- 0
Marlin/cardreader.h View File

@@ -35,6 +35,7 @@ public:
35 35
   inline int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
36 36
   inline void setIndex(long index) {sdpos = index;file.seekSet(index);};
37 37
   inline uint8_t percentDone(){if(!sdprinting) return 0; if(filesize) return sdpos*100/filesize; else return 0;};
38
+  inline char* getWorkDirName(){workDir.getFilename(filename);return filename;};
38 39
 
39 40
 public:
40 41
   bool saving;

+ 9
- 9
Marlin/ultralcd.pde View File

@@ -456,7 +456,7 @@ void MainMenu::showPrepare()
456 456
   switch(i)
457 457
   {
458 458
     case ItemP_exit:
459
-      MENUITEM(  lcdprintPGM(" Prepare")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
459
+      MENUITEM(  lcdprintPGM(" Main \003")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
460 460
       break;
461 461
     case ItemP_home:
462 462
       MENUITEM(  lcdprintPGM(" Auto Home")  ,  BLOCK;enquecommand("G28 X-105 Y-105 Z0");beepshort(); ) ;
@@ -493,7 +493,7 @@ void MainMenu::showTune()
493 493
   switch(i)
494 494
   {
495 495
   case ItemT_exit:
496
-      MENUITEM(  lcdprintPGM(" Tune")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
496
+      MENUITEM(  lcdprintPGM(" Main \003")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
497 497
       break;
498 498
   case ItemT_speed:
499 499
     {
@@ -673,7 +673,7 @@ void MainMenu::showControlTemp()
673 673
   switch(i)
674 674
   {
675 675
     case ItemCT_exit:
676
-      MENUITEM(  lcdprintPGM(" Temperature")  ,  BLOCK;status=Main_Control;beepshort(); ) ;
676
+      MENUITEM(  lcdprintPGM(" Control \003")  ,  BLOCK;status=Main_Control;beepshort(); ) ;
677 677
       break;
678 678
     case ItemCT_nozzle:
679 679
       {
@@ -915,7 +915,7 @@ void MainMenu::showControlMotion()
915 915
   switch(i)
916 916
   {
917 917
     case ItemCM_exit:
918
-      MENUITEM(  lcdprintPGM(" Motion")  ,  BLOCK;status=Main_Control;beepshort(); ) ;
918
+      MENUITEM(  lcdprintPGM(" Control \003")  ,  BLOCK;status=Main_Control;beepshort(); ) ;
919 919
       break;
920 920
     case ItemCM_acc:
921 921
     {
@@ -1230,7 +1230,7 @@ void MainMenu::showControl()
1230 1230
   switch(i)
1231 1231
   {
1232 1232
     case ItemC_exit:
1233
-      MENUITEM(  lcdprintPGM(" Control     \x7E")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
1233
+      MENUITEM(  lcdprintPGM(" Main        \003")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
1234 1234
       break;
1235 1235
     case ItemC_temp:
1236 1236
       MENUITEM(  lcdprintPGM(" Temperature \x7E")  ,  BLOCK;status=Sub_TempControl;beepshort(); ) ;
@@ -1317,7 +1317,7 @@ void MainMenu::showSD()
1317 1317
   switch(i)
1318 1318
   {
1319 1319
     case 0:
1320
-      MENUITEM(  lcdprintPGM(" File")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
1320
+      MENUITEM(  lcdprintPGM(" Main \003")  ,  BLOCK;status=Main_Menu;beepshort(); ) ;
1321 1321
       break;
1322 1322
 //     case 1:
1323 1323
 //       {
@@ -1348,7 +1348,7 @@ void MainMenu::showSD()
1348 1348
 //         }
1349 1349
 //       }break;
1350 1350
     case 1:
1351
-      MENUITEM(  lcdprintPGM(" ..")  ,  BLOCK;card.updir();enforceupdate=true;lineoffset=0;beepshort(); ) ;
1351
+      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(); ) ;
1352 1352
       
1353 1353
       break;
1354 1354
     default:
@@ -1435,10 +1435,10 @@ void MainMenu::showMainMenu()
1435 1435
     switch(line)
1436 1436
     { 
1437 1437
       case ItemM_watch:
1438
-        MENUITEM(  lcdprintPGM(" Watch")  ,  BLOCK;status=Main_Status;beepshort(); ) ;
1438
+        MENUITEM(  lcdprintPGM(" Watch \003")  ,  BLOCK;status=Main_Status;beepshort(); ) ;
1439 1439
        break;
1440 1440
       case ItemM_prepare:
1441
-        MENUITEM(  if(!tune) lcdprintPGM(" Prepare \x7E");else  lcdprintPGM(" Tune \x7E"); ,  BLOCK;status=Main_Prepare;beepshort(); ) ;
1441
+        MENUITEM(  if(!tune) lcdprintPGM(" Prepare \x7E");else  lcdprintPGM(" Tune    \x7E"); ,  BLOCK;status=Main_Prepare;beepshort(); ) ;
1442 1442
       break;
1443 1443
        
1444 1444
       case ItemM_control:

Loading…
Cancel
Save