void ls();
void chdir(const char * relpath);
void updir();
+ void setroot();
+
FORCE_INLINE bool eof() { return sdpos>=filesize ;};
FORCE_INLINE int16_t get() { sdpos = file.curPosition();return (int16_t)file.read();};
SERIAL_ECHOLNPGM("workDir open failed");
}
}
+
+void CardReader::setroot()
+{
+ curDir=&root;
+ if(!workDir.openRoot(&volume))
+ {
+ SERIAL_ECHOLNPGM("workDir open failed");
+ }
+}
void CardReader::release()
{
sdprinting = false;
MENUITEM( lcdprintPGM(" Main \003") , BLOCK;status=Main_Menu;beepshort(); ) ;
break;
case ItemP_autostart:
- MENUITEM( lcdprintPGM(" Autostart") , BLOCK;card.lastnr=0;card.checkautostart(true);beepshort(); ) ;
+ MENUITEM( lcdprintPGM(" Autostart") , BLOCK;card.lastnr=0;card.setroot();card.checkautostart(true);beepshort(); ) ;
break;
case ItemP_disstep:
MENUITEM( lcdprintPGM(" Disable Steppers") , BLOCK;enquecommand("M84");beepshort(); ) ;