From b1aa1a5fb91f5d571e94576885ff62a1714468a2 Mon Sep 17 00:00:00 2001 From: Sam Hardeman Date: Thu, 22 Oct 2020 18:03:26 +0900 Subject: [PATCH] Allow repeated command entries when in "Special Menu" by not clearing "SelectedDirectory". --- Marlin/AnycubicTFT.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Marlin/AnycubicTFT.cpp b/Marlin/AnycubicTFT.cpp index 08e8ab1..aeb96de 100644 --- a/Marlin/AnycubicTFT.cpp +++ b/Marlin/AnycubicTFT.cpp @@ -903,7 +903,9 @@ void AnycubicTFTClass::GetCommandFromTFT() } case 8: // A8 GET SD LIST #ifdef SDSUPPORT - SelectedDirectory[0]=0; + if (!SpecialMenu) + SelectedDirectory[0]=0; + if(!IS_SD_INSERTED()) { ANYCUBIC_SERIAL_PROTOCOLPGM("J02"); @@ -985,7 +987,8 @@ void AnycubicTFTClass::GetCommandFromTFT() } else if (TFTstrchr_pointer[4] == '<') { strcpy(SelectedDirectory, TFTstrchr_pointer+4); } else { - SelectedDirectory[0]=0; + if (!SpecialMenu) + SelectedDirectory[0]=0; if(starpos!=NULL) *(starpos-1)='\0'; @@ -1211,7 +1214,8 @@ void AnycubicTFTClass::GetCommandFromTFT() } } - SelectedDirectory[0]=0; + if (!SpecialMenu) + SelectedDirectory[0]=0; if(!IS_SD_INSERTED()) {