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(){};
-
- 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;};
-
+#define IS_SD_PRINTING (false)
- 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
\ No newline at end of file
+#endif
//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);
#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
char *itostr4(const int &xx);
char *ftostr51(const float &x);
#endif //ULTRALCD
-
extern volatile int extrudemultiply;
extern long position[4];
+#ifdef SDSUPPORT
extern CardReader card;
+#endif
//===========================================================================
//=============================public variables============================
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(); ) ;
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));
}
#endif
if(tune)
{
- if(!(movesplanned() ||card.sdprinting))
+ if(!(movesplanned() || IS_SD_PRINTING))
{
force_lcd_update=true;
tune=false;
}
else
{
- if(movesplanned() ||card.sdprinting)
+ if(movesplanned() || IS_SD_PRINTING)
{
force_lcd_update=true;
tune=true;