Reverse SD card file name order.

This is _not_ automatically the cronological, since deleting a file will free
the filesystem descriptor for it, which then will be used by the next file copied on it.
Since this makes the auto0.g file very inaccessible, I put the option back, to have it in the prepare menu.

this should satisfy https://github.com/ErikZalm/Marlin/pull/373

as a reminder, auto0.g will be executed every time after a boot with sd card present and file present.
thereafter, if there is a file auto1.g this will be done. Thats IMHO the best place to put settings, and prepare heating.
I also execute again after each (now again via the prepare menu) before starting a new print/ after a failed one.
It for me 100% replaces any start.gcode form the slicers.
This commit is contained in:
bkubicek
2013-10-12 13:24:55 +02:00
parent 73c82e7ad8
commit 7fad13a1e2
2 changed files with 19 additions and 2 deletions

View File

@ -420,7 +420,9 @@ static void lcd_prepare_menu()
START_MENU();
MENU_ITEM(back, MSG_MAIN, lcd_main_menu);
#ifdef SDSUPPORT
//MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
#ifdef MENU_ADDAUTOSTART
MENU_ITEM(function, MSG_AUTOSTART, lcd_autostart_sd);
#endif
#endif
MENU_ITEM(gcode, MSG_DISABLE_STEPPERS, PSTR("M84"));
MENU_ITEM(gcode, MSG_AUTO_HOME, PSTR("G28"));
@ -792,7 +794,11 @@ void lcd_sdcard_menu()
{
if (_menuItemNr == _lineNr)
{
card.getfilename(i);
#ifndef SDCARD_RATHERRECENTFIRST
card.getfilename(i);
#else
card.getfilename(fileCnt-1-i);
#endif
if (card.filenameIsDir)
{
MENU_ITEM(sddirectory, MSG_CARD_MENU, card.filename, card.longFilename);