overworked ultralcd a bit
This commit is contained in:
parent
a6823a84e1
commit
c54a807824
2 changed files with 10 additions and 9 deletions
|
@ -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;
|
||||
|
|
|
@ -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,7 +1435,7 @@ 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(); ) ;
|
||||
|
|
Reference in a new issue