Преглед на файлове

Fix Anycubic I3 Mega (S) original screen % display (#19210)

Stéphane преди 4 години
родител
ревизия
2979da73cf
No account linked to committer's email address
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  1. 3
    2
      Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp

+ 3
- 2
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp Целия файл

@@ -28,6 +28,7 @@
28 28
 #include "../../../../inc/MarlinConfig.h"
29 29
 #include "../../ui_api.h"
30 30
 #include "../../../../MarlinCore.h" // for quickstop_stepper and disable_steppers
31
+#include "../../../../module/motion.h"	// for A20 read printing speed feedrate_percentage
31 32
 
32 33
 // command sending macro's with debugging capability
33 34
 #define SEND_PGM(x)                                 send_P(PSTR(x))
@@ -412,6 +413,7 @@ void AnycubicTFTClass::RenderCurrentFileList() {
412 413
     uint16_t selectedNumber = 0;
413 414
     SelectedDirectory[0] = 0;
414 415
     SelectedFile[0] = 0;
416
+    ExtUI::FileList currentFileList;                                 
415 417
 
416 418
     SENDLINE_PGM("FN "); // Filelist start
417 419
 
@@ -427,7 +429,7 @@ void AnycubicTFTClass::RenderCurrentFileList() {
427 429
 
428 430
       if (SpecialMenu)
429 431
         RenderSpecialMenu(selectedNumber);
430
-      else
432
+      else if (selectedNumber <= currentFileList.count())
431 433
         RenderCurrentFolder(selectedNumber);
432 434
     }
433 435
     SENDLINE_PGM("END"); // Filelist stop
@@ -804,7 +806,6 @@ void AnycubicTFTClass::GetCommandFromTFT() {
804 806
             break;
805 807
 
806 808
           case 20: { // A20 read printing speed
807
-            int16_t feedrate_percentage = 100;
808 809
 
809 810
             if (CodeSeen('S'))
810 811
               feedrate_percentage = constrain(CodeValue(), 40, 999);

Loading…
Отказ
Запис