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
   inline int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
35
   inline int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
36
   inline void setIndex(long index) {sdpos = index;file.seekSet(index);};
36
   inline void setIndex(long index) {sdpos = index;file.seekSet(index);};
37
   inline uint8_t percentDone(){if(!sdprinting) return 0; if(filesize) return sdpos*100/filesize; else return 0;};
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
 public:
40
 public:
40
   bool saving;
41
   bool saving;

+ 9
- 9
Marlin/ultralcd.pde View File

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

Loading…
Cancel
Save