Skip to content

Commit

Permalink
Fix Anycubic I3 Mega (S) original screen % display (MarlinFirmware#19210
Browse files Browse the repository at this point in the history
)
  • Loading branch information
stef-ladefense authored Sep 1, 2020
1 parent d3ac4ba commit 2979da7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "../../../../inc/MarlinConfig.h"
#include "../../ui_api.h"
#include "../../../../MarlinCore.h" // for quickstop_stepper and disable_steppers
#include "../../../../module/motion.h" // for A20 read printing speed feedrate_percentage

// command sending macro's with debugging capability
#define SEND_PGM(x) send_P(PSTR(x))
Expand Down Expand Up @@ -412,6 +413,7 @@ void AnycubicTFTClass::RenderCurrentFileList() {
uint16_t selectedNumber = 0;
SelectedDirectory[0] = 0;
SelectedFile[0] = 0;
ExtUI::FileList currentFileList;

SENDLINE_PGM("FN "); // Filelist start

Expand All @@ -427,7 +429,7 @@ void AnycubicTFTClass::RenderCurrentFileList() {

if (SpecialMenu)
RenderSpecialMenu(selectedNumber);
else
else if (selectedNumber <= currentFileList.count())
RenderCurrentFolder(selectedNumber);
}
SENDLINE_PGM("END"); // Filelist stop
Expand Down Expand Up @@ -804,7 +806,6 @@ void AnycubicTFTClass::GetCommandFromTFT() {
break;

case 20: { // A20 read printing speed
int16_t feedrate_percentage = 100;

if (CodeSeen('S'))
feedrate_percentage = constrain(CodeValue(), 40, 999);
Expand Down

0 comments on commit 2979da7

Please sign in to comment.