Restructure fileList to load faster.
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
* here we define this default string as the date where the latest release
|
* here we define this default string as the date where the latest release
|
||||||
* version was tagged.
|
* version was tagged.
|
||||||
*/
|
*/
|
||||||
#define CUSTOM_BUILD_VERSION "1.5.1-pre"
|
#define CUSTOM_BUILD_VERSION "1.5.1"
|
||||||
|
|
||||||
#ifndef STRING_DISTRIBUTION_DATE
|
#ifndef STRING_DISTRIBUTION_DATE
|
||||||
#define STRING_DISTRIBUTION_DATE "2023-06-09"
|
#define STRING_DISTRIBUTION_DATE "2023-06-09"
|
||||||
|
@@ -646,11 +646,17 @@
|
|||||||
|
|
||||||
void AnycubicTouchscreenClass::RenderCurrentFileList() {
|
void AnycubicTouchscreenClass::RenderCurrentFileList() {
|
||||||
currentFileOrDirectory[0] = 0;
|
currentFileOrDirectory[0] = 0;
|
||||||
|
uint16_t selectedNumber = 0;
|
||||||
|
FileList currentFileList;
|
||||||
|
|
||||||
if (SpecialMenu == false) {
|
if (SpecialMenu == false) {
|
||||||
currentTouchscreenSelection[0] = 0;
|
currentTouchscreenSelection[0] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CodeSeen('S')) {
|
||||||
|
selectedNumber = CodeValue();
|
||||||
|
}
|
||||||
|
|
||||||
// Filelist start
|
// Filelist start
|
||||||
SEND_PGM("FN ");
|
SEND_PGM("FN ");
|
||||||
SENDLINE_PGM("");
|
SENDLINE_PGM("");
|
||||||
@@ -659,13 +665,6 @@ void AnycubicTouchscreenClass::RenderCurrentFileList() {
|
|||||||
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
SENDLINE_PGM(SM_SPECIAL_MENU_S);
|
||||||
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
SENDLINE_PGM(SM_SPECIAL_MENU_L);
|
||||||
} else {
|
} else {
|
||||||
uint16_t selectedNumber = 0;
|
|
||||||
FileList currentFileList;
|
|
||||||
|
|
||||||
if (CodeSeen('S')) {
|
|
||||||
selectedNumber = CodeValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (SpecialMenu) {
|
if (SpecialMenu) {
|
||||||
RenderSpecialMenu(selectedNumber);
|
RenderSpecialMenu(selectedNumber);
|
||||||
} else if (selectedNumber <= currentFileList.count()) {
|
} else if (selectedNumber <= currentFileList.count()) {
|
||||||
|
Reference in New Issue
Block a user