Show filename during print fixed, sorting files on Sd card in farm mode fixed

This commit is contained in:
PavelSindler 2017-08-31 16:12:52 +02:00
parent a9cbd91321
commit 33168bedbd
2 changed files with 12 additions and 15 deletions

View File

@ -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 -

View File

@ -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