diff --git a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp index 85eb424d..619c471b 100755 --- a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp @@ -84,6 +84,8 @@ *value = c; pos++; value++; + if(pos > 32766) + break; } while (--size); } @@ -967,6 +969,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { #if ENABLED(ANYCUBIC_LCD_DEBUG) SERIAL_ECHOLN(currentFileList.filename()); #endif + /* if (currentFileList.isDir()) { SEND_PGM("/"); @@ -1038,7 +1041,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { SERIAL_ECHO(count); SERIAL_ECHOPGM(": /"); SERIAL_ECHOLN(outputString); - } else { + } else { // The current selection is a file and not a directory SENDLINE(currentFileList.shortFilename()); SENDLINE(outputString); SERIAL_ECHO(count); @@ -1570,7 +1573,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { currentFileOrDirectory[currentFileLen - 4] = '\0'; currentFileList.changeDir(currentFileOrDirectory); #else - currentFileList.changeDir(currentFileOrDirectory); + currentFileList.changeDir(currentTouchscreenSelection); #endif } } diff --git a/Marlin/src/pins/ramps/pins_RAMPS_CHIRON.h b/Marlin/src/pins/ramps/pins_RAMPS_CHIRON.h index c3561808..448e689c 100755 --- a/Marlin/src/pins/ramps/pins_RAMPS_CHIRON.h +++ b/Marlin/src/pins/ramps/pins_RAMPS_CHIRON.h @@ -142,6 +142,19 @@ #define Z_CS_PIN 40 #endif +#ifndef Z2_STEP_PIN + #define Z2_STEP_PIN 46 +#endif +#ifndef Z2_DIR_PIN + #define Z2_DIR_PIN 48 +#endif +#ifndef Z2_ENABLE_PIN + #define Z2_ENABLE_PIN 62 +#endif +#ifndef Z2_CS_PIN + #define Z2_CS_PIN 40 +#endif + #define E0_STEP_PIN 26 #define E0_DIR_PIN 28 #define E0_ENABLE_PIN 24