From 57d0f0ce2e8103a6c518741a44f58afd08ec4da9 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 20 Apr 2021 19:16:27 -0500 Subject: [PATCH] Fix Chiron typos, file nav --- Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp | 4 ++-- Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h | 1 + Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp b/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp index 9975d0824f..01a871a542 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp @@ -75,7 +75,7 @@ void FileNavigator::reset() { currentfolderdepth = 0; currentindex = 0; lastpanelindex = 0; - ZERO(currentfolderindex) + ZERO(currentfolderindex); // Start at root folder while (!filelist.isAtRootDir()) filelist.upDir(); @@ -108,7 +108,7 @@ void FileNavigator::upDIR() { if (currentfolderdepth == 0) currentfoldername[0] = '\0'; else { - const char *pos = strchr(currentfoldername, '/'); + char * const pos = strchr(currentfoldername, '/'); *(pos + 1) = '\0'; } } diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h b/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h index 253b8039e7..0d55eb47b7 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h +++ b/Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h @@ -38,6 +38,7 @@ namespace Anycubic { class FileNavigator { public: + FileNavigator(); static void reset(); static void getFiles(uint16_t, panel_type_t, uint8_t filesneeded=4); static void upDIR(); diff --git a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp index b35d792736..b6b0eb9eb5 100644 --- a/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp @@ -466,7 +466,7 @@ void ChironTFT::SelectFile() { void ChironTFT::ProcessPanelRequest() { // Break these up into logical blocks // as its easier to navigate than one huge switch case! - const int8_t tpos = FindToken('A'); + int8_t tpos = FindToken('A'); // Panel request are 'A0' - 'A36' if (tpos != -1) { const int8_t req = atoi(&panel_command[tpos+1]);