diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index e44dbe855..b0fd89638 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -4186,7 +4186,8 @@ void lcd_sdcard_menu() { if (_menuItemNr == _lineNr) { - const uint16_t nr = (sdSort == SD_SORT_NONE) ? (fileCnt - 1 - i) : i; + const uint16_t nr = ((sdSort == SD_SORT_NONE) || farm_mode) ? (fileCnt - 1 - i) : i; + /* #ifdef SDCARD_RATHERRECENTFIRST #ifndef SDCARD_SORT_ALPHA fileCnt - 1 - diff --git a/Firmware/ultralcd_implementation_hitachi_HD44780.h b/Firmware/ultralcd_implementation_hitachi_HD44780.h index c421140f7..ec360c626 100644 --- a/Firmware/ultralcd_implementation_hitachi_HD44780.h +++ b/Firmware/ultralcd_implementation_hitachi_HD44780.h @@ -830,21 +830,20 @@ static void lcd_implementation_status_screen() // If heating in progress, set flag if (heating_status != 0) { custom_message = true; } + if (IS_SD_PRINTING) { + if (strcmp(longFilenameOLD, card.longFilename) != 0) + { + memset(longFilenameOLD, '\0', strlen(longFilenameOLD)); + sprintf_P(longFilenameOLD, PSTR("%s"), card.longFilename); + scrollstuff = 0; + } + } + // If printing from SD, show what we are printing - if (IS_SD_PRINTING) + if (IS_SD_PRINTING && !custom_message) { - - if(strcmp(longFilenameOLD, card.longFilename) != 0) - { - memset(longFilenameOLD,'\0',strlen(longFilenameOLD)); - sprintf_P(longFilenameOLD, PSTR("%s"), card.longFilename); - scrollstuff = 0; - } - if (!custom_message) { - if (strlen(card.longFilename) > LCD_WIDTH) { - int inters = 0; int gh = scrollstuff; while (((gh - scrollstuff) < LCD_WIDTH) && (inters == 0)) @@ -873,9 +872,6 @@ static void lcd_implementation_status_screen() { lcd.print(longFilenameOLD); } - } - - } // If not, check for other special events else