Fix compiler warnings for Chiron build and Directory selection on Anycubic 1.0 displays.

This commit is contained in:
Knutwurst
2023-05-30 16:46:30 +02:00
parent 75ffa32980
commit 9c4c58235b
2 changed files with 18 additions and 2 deletions

View File

@@ -84,6 +84,8 @@
*value = c; *value = c;
pos++; pos++;
value++; value++;
if(pos > 32766)
break;
} while (--size); } while (--size);
} }
@@ -967,6 +969,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
#if ENABLED(ANYCUBIC_LCD_DEBUG) #if ENABLED(ANYCUBIC_LCD_DEBUG)
SERIAL_ECHOLN(currentFileList.filename()); SERIAL_ECHOLN(currentFileList.filename());
#endif #endif
/* /*
if (currentFileList.isDir()) { if (currentFileList.isDir()) {
SEND_PGM("/"); SEND_PGM("/");
@@ -1038,7 +1041,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
SERIAL_ECHO(count); SERIAL_ECHO(count);
SERIAL_ECHOPGM(": /"); SERIAL_ECHOPGM(": /");
SERIAL_ECHOLN(outputString); SERIAL_ECHOLN(outputString);
} else { } else { // The current selection is a file and not a directory
SENDLINE(currentFileList.shortFilename()); SENDLINE(currentFileList.shortFilename());
SENDLINE(outputString); SENDLINE(outputString);
SERIAL_ECHO(count); SERIAL_ECHO(count);
@@ -1570,7 +1573,7 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) {
currentFileOrDirectory[currentFileLen - 4] = '\0'; currentFileOrDirectory[currentFileLen - 4] = '\0';
currentFileList.changeDir(currentFileOrDirectory); currentFileList.changeDir(currentFileOrDirectory);
#else #else
currentFileList.changeDir(currentFileOrDirectory); currentFileList.changeDir(currentTouchscreenSelection);
#endif #endif
} }
} }

View File

@@ -142,6 +142,19 @@
#define Z_CS_PIN 40 #define Z_CS_PIN 40
#endif #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_STEP_PIN 26
#define E0_DIR_PIN 28 #define E0_DIR_PIN 28
#define E0_ENABLE_PIN 24 #define E0_ENABLE_PIN 24