Explorar o código

If in farm mode, force the sorting direction to be reversed

So in an ideal scenario, the newest file is first. This of course breaks as soon as a file is deleted/renamed/moved, but it should at least be fixed now compared to before where the direction could be influenced by a disabled setting
Alex Voinea %!s(int64=2) %!d(string=hai) anos
pai
achega
b485992c9e
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Firmware/ultralcd.cpp

+ 1 - 1
Firmware/ultralcd.cpp

@@ -6001,7 +6001,7 @@ void lcd_sdcard_menu()
 				lcd_update_enabled = true;
 			}
 			_md->fileCnt = card.getnrfilenames();
-			_md->sdSort = eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
+			_md->sdSort = farm_mode ? SD_SORT_NONE : eeprom_read_byte((uint8_t*)EEPROM_SD_SORT);
 			_md->menuState = _standard;
 			_md->row = -1; // assume that no SD file/dir is currently selected. Once they are rendered, it will be changed to the correct row for the _scrolling state.
 		}