Fixed general 16x2 LCD build without SD support.
This commit is contained in:
parent
d47b666630
commit
3d83109028
3 changed files with 16 additions and 40 deletions
|
@ -64,39 +64,11 @@ private:
|
|||
char* diveDirName;
|
||||
void lsDive(const char *prepend,SdFile parent);
|
||||
};
|
||||
|
||||
#define IS_SD_PRINTING (card.sdprinting)
|
||||
|
||||
#else
|
||||
|
||||
#define dir_t bool
|
||||
class CardReader
|
||||
{
|
||||
public:
|
||||
FORCE_INLINE CardReader(){};
|
||||
#define IS_SD_PRINTING (false)
|
||||
|
||||
FORCE_INLINE static void initsd(){};
|
||||
FORCE_INLINE static void write_command(char *buf){};
|
||||
|
||||
FORCE_INLINE static void checkautostart(bool x) {};
|
||||
|
||||
FORCE_INLINE static void openFile(char* name,bool read){};
|
||||
FORCE_INLINE static void closefile() {};
|
||||
FORCE_INLINE static void release(){};
|
||||
FORCE_INLINE static void startFileprint(){};
|
||||
FORCE_INLINE static void startFilewrite(char *name){};
|
||||
FORCE_INLINE static void pauseSDPrint(){};
|
||||
FORCE_INLINE static void getStatus(){};
|
||||
|
||||
FORCE_INLINE static void selectFile(char* name){};
|
||||
FORCE_INLINE static void getfilename(const uint8_t nr){};
|
||||
FORCE_INLINE static uint8_t getnrfilenames(){return 0;};
|
||||
|
||||
|
||||
FORCE_INLINE static void ls() {};
|
||||
FORCE_INLINE static bool eof() {return true;};
|
||||
FORCE_INLINE static char get() {return 0;};
|
||||
FORCE_INLINE static void setIndex(){};
|
||||
FORCE_INLINE uint8_t percentDone(){return 0;};
|
||||
};
|
||||
#endif //SDSUPPORT
|
||||
#endif
|
|
@ -129,6 +129,7 @@
|
|||
|
||||
//conversion routines, could need some overworking
|
||||
char *ftostr51(const float &x);
|
||||
char *ftostr52(const float &x);
|
||||
char *ftostr31(const float &x);
|
||||
char *ftostr3(const float &x);
|
||||
|
||||
|
@ -142,10 +143,8 @@
|
|||
#define LCD_MESSAGE(x)
|
||||
#define LCD_MESSAGEPGM(x)
|
||||
FORCE_INLINE void lcd_status() {};
|
||||
#endif
|
||||
|
||||
#ifndef ULTIPANEL
|
||||
#define CLICKED false
|
||||
#define CLICKED false
|
||||
#define BLOCK ;
|
||||
#endif
|
||||
|
||||
|
@ -160,4 +159,3 @@ char *itostr3(const int &xx);
|
|||
char *itostr4(const int &xx);
|
||||
char *ftostr51(const float &x);
|
||||
#endif //ULTRALCD
|
||||
|
||||
|
|
|
@ -12,7 +12,9 @@ extern volatile bool feedmultiplychanged;
|
|||
extern volatile int extrudemultiply;
|
||||
|
||||
extern long position[4];
|
||||
#ifdef SDSUPPORT
|
||||
extern CardReader card;
|
||||
#endif
|
||||
|
||||
//===========================================================================
|
||||
//=============================public variables============================
|
||||
|
@ -480,7 +482,11 @@ void MainMenu::showPrepare()
|
|||
MENUITEM( lcdprintPGM(MSG_MAIN) , BLOCK;status=Main_Menu;beepshort(); ) ;
|
||||
break;
|
||||
case ItemP_autostart:
|
||||
MENUITEM( lcdprintPGM(MSG_AUTOSTART) , BLOCK;card.lastnr=0;card.setroot();card.checkautostart(true);beepshort(); ) ;
|
||||
MENUITEM( lcdprintPGM(MSG_AUTOSTART) , BLOCK;
|
||||
#ifdef SDSUPPORT
|
||||
card.lastnr=0;card.setroot();card.checkautostart(true);
|
||||
#endif
|
||||
beepshort(); ) ;
|
||||
break;
|
||||
case ItemP_disstep:
|
||||
MENUITEM( lcdprintPGM(MSG_DISABLE_STEPPERS) , BLOCK;enquecommand("M84");beepshort(); ) ;
|
||||
|
@ -1629,7 +1635,7 @@ void MainMenu::showControlMotion()
|
|||
if(linechanging)
|
||||
{
|
||||
if(encoderpos<5) encoderpos=5;
|
||||
if(encoderpos>99999) encoderpos=99999;
|
||||
if(encoderpos>32000) encoderpos=32000;//TODO: This is a problem, encoderpos is 16bit, but steps_per_unit for e can be wel over 800
|
||||
lcd.setCursor(11,line);lcd.print(ftostr52(encoderpos/100.0));
|
||||
}
|
||||
|
||||
|
@ -1957,7 +1963,7 @@ void MainMenu::showMainMenu()
|
|||
#endif
|
||||
if(tune)
|
||||
{
|
||||
if(!(movesplanned() ||card.sdprinting))
|
||||
if(!(movesplanned() || IS_SD_PRINTING))
|
||||
{
|
||||
force_lcd_update=true;
|
||||
tune=false;
|
||||
|
@ -1965,7 +1971,7 @@ void MainMenu::showMainMenu()
|
|||
}
|
||||
else
|
||||
{
|
||||
if(movesplanned() ||card.sdprinting)
|
||||
if(movesplanned() || IS_SD_PRINTING)
|
||||
{
|
||||
force_lcd_update=true;
|
||||
tune=true;
|
||||
|
|
Reference in a new issue