File tree Expand file tree Collapse file tree
Marlin/src/lcd/extui/lib/anycubic_i3mega Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828#include " ../../../../inc/MarlinConfig.h"
2929#include " ../../ui_api.h"
3030#include " ../../../../MarlinCore.h" // for quickstop_stepper and disable_steppers
31+ #include " ../../../../module/motion.h" // for A20 read printing speed feedrate_percentage
3132
3233// command sending macro's with debugging capability
3334#define SEND_PGM (x ) send_P(PSTR (x))
@@ -412,6 +413,7 @@ void AnycubicTFTClass::RenderCurrentFileList() {
412413 uint16_t selectedNumber = 0 ;
413414 SelectedDirectory[0 ] = 0 ;
414415 SelectedFile[0 ] = 0 ;
416+ ExtUI::FileList currentFileList;
415417
416418 SENDLINE_PGM (" FN " ); // Filelist start
417419
@@ -427,7 +429,7 @@ void AnycubicTFTClass::RenderCurrentFileList() {
427429
428430 if (SpecialMenu)
429431 RenderSpecialMenu (selectedNumber);
430- else
432+ else if (selectedNumber <= currentFileList. count ())
431433 RenderCurrentFolder (selectedNumber);
432434 }
433435 SENDLINE_PGM (" END" ); // Filelist stop
@@ -804,7 +806,6 @@ void AnycubicTFTClass::GetCommandFromTFT() {
804806 break ;
805807
806808 case 20 : { // A20 read printing speed
807- int16_t feedrate_percentage = 100 ;
808809
809810 if (CodeSeen (' S' ))
810811 feedrate_percentage = constrain (CodeValue (), 40 , 999 );
You can’t perform that action at this time.
0 commit comments