From c54a80782418a65b6bb7137850ac2129b9f4f7c5 Mon Sep 17 00:00:00 2001 From: Bernhard Date: Fri, 25 Nov 2011 23:37:08 +0100 Subject: [PATCH] overworked ultralcd a bit --- Marlin/cardreader.h | 1 + Marlin/ultralcd.pde | 18 +++++++++--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Marlin/cardreader.h b/Marlin/cardreader.h index 44ebf0e2c..18086e576 100644 --- a/Marlin/cardreader.h +++ b/Marlin/cardreader.h @@ -35,6 +35,7 @@ public: inline int16_t get() { sdpos = file.curPosition();return (int16_t)file.read();}; inline void setIndex(long index) {sdpos = index;file.seekSet(index);}; inline uint8_t percentDone(){if(!sdprinting) return 0; if(filesize) return sdpos*100/filesize; else return 0;}; + inline char* getWorkDirName(){workDir.getFilename(filename);return filename;}; public: bool saving; diff --git a/Marlin/ultralcd.pde b/Marlin/ultralcd.pde index e6a16a408..47396e4c1 100644 --- a/Marlin/ultralcd.pde +++ b/Marlin/ultralcd.pde @@ -456,7 +456,7 @@ void MainMenu::showPrepare() switch(i) { case ItemP_exit: - MENUITEM( lcdprintPGM(" Prepare") , BLOCK;status=Main_Menu;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ; break; case ItemP_home: MENUITEM( lcdprintPGM(" Auto Home") , BLOCK;enquecommand("G28 X-105 Y-105 Z0");beepshort(); ) ; @@ -493,7 +493,7 @@ void MainMenu::showTune() switch(i) { case ItemT_exit: - MENUITEM( lcdprintPGM(" Tune") , BLOCK;status=Main_Menu;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ; break; case ItemT_speed: { @@ -673,7 +673,7 @@ void MainMenu::showControlTemp() switch(i) { case ItemCT_exit: - MENUITEM( lcdprintPGM(" Temperature") , BLOCK;status=Main_Control;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Control \003") , BLOCK;status=Main_Control;beepshort(); ) ; break; case ItemCT_nozzle: { @@ -915,7 +915,7 @@ void MainMenu::showControlMotion() switch(i) { case ItemCM_exit: - MENUITEM( lcdprintPGM(" Motion") , BLOCK;status=Main_Control;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Control \003") , BLOCK;status=Main_Control;beepshort(); ) ; break; case ItemCM_acc: { @@ -1230,7 +1230,7 @@ void MainMenu::showControl() switch(i) { case ItemC_exit: - MENUITEM( lcdprintPGM(" Control \x7E") , BLOCK;status=Main_Menu;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ; break; case ItemC_temp: MENUITEM( lcdprintPGM(" Temperature \x7E") , BLOCK;status=Sub_TempControl;beepshort(); ) ; @@ -1317,7 +1317,7 @@ void MainMenu::showSD() switch(i) { case 0: - MENUITEM( lcdprintPGM(" File") , BLOCK;status=Main_Menu;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ; break; // case 1: // { @@ -1348,7 +1348,7 @@ void MainMenu::showSD() // } // }break; case 1: - MENUITEM( lcdprintPGM(" ..") , BLOCK;card.updir();enforceupdate=true;lineoffset=0;beepshort(); ) ; + 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(); ) ; break; default: @@ -1435,10 +1435,10 @@ void MainMenu::showMainMenu() switch(line) { case ItemM_watch: - MENUITEM( lcdprintPGM(" Watch") , BLOCK;status=Main_Status;beepshort(); ) ; + MENUITEM( lcdprintPGM(" Watch \003") , 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(" Prepare \x7E");else lcdprintPGM(" Tune \x7E"); , BLOCK;status=Main_Prepare;beepshort(); ) ; break; case ItemM_control: