Browse Source

Fix Chiron typos, file nav

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
a866a8f2fb
  1. 4
      Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.cpp
  2. 1
      Marlin/src/lcd/extui/lib/anycubic_chiron/FileNavigator.h
  3. 2
      Marlin/src/lcd/extui/lib/anycubic_chiron/chiron_tft.cpp

4
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';
}
}

1
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();

2
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]);

Loading…
Cancel
Save