Fix Chiron typos, file nav

This commit is contained in:
Scott Lahteine 2021-04-20 19:16:27 -05:00
parent 214324aaa2
commit a866a8f2fb
3 changed files with 4 additions and 3 deletions

View File

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

View File

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

View File

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