Browse Source

Fix some DGUS bugs

- No action on first click of the move button
vanilla_fb_2.0.x
George Fu 5 years ago
committed by Scott Lahteine
parent
commit
cbf349b5eb
  1. 7
      Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp
  2. 2
      Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.cpp
  3. 2
      Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp
  4. 2
      Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.cpp

7
Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp

@ -443,6 +443,7 @@ void DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variab
void DGUSScreenVariableHandler::SDCardInserted() {
top_file = 0;
filelist.refresh();
auto cs = ScreenHandler.getCurrentScreen();
if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS)
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_SDFILELIST);
@ -614,8 +615,10 @@ void DGUSScreenVariableHandler::HandleManualMove(DGUS_VP_Variable &var, void *va
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
const uint16_t choice = *(uint16_t*)var.memadr;
movevalue = movevalue > 0 ? choice : -choice;
if (movevalue) {
const uint16_t choice = *(uint16_t*)var.memadr;
movevalue = movevalue < 0 ? -choice : choice;
}
#endif
char axiscode;
unsigned int speed = 1500; //FIXME: get default feedrate for manual moves, dont hardcode.

2
Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.cpp

@ -37,7 +37,7 @@
#include "../../../../ultralcd.h"
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
uint16_t distanceToMove = 0.1;
uint16_t distanceToMove = 10;
#endif
const uint16_t VPList_Boot[] PROGMEM = {

2
Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp

@ -37,7 +37,7 @@
#include "../../../../ultralcd.h"
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
uint16_t distanceToMove = 0.1;
uint16_t distanceToMove = 10;
#endif
const uint16_t VPList_Boot[] PROGMEM = {

2
Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.cpp

@ -36,7 +36,7 @@
#include "../../../../ultralcd.h"
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
uint16_t distanceToMove = 0.1;
uint16_t distanceToMove = 10;
#endif
const uint16_t VPList_Boot[] PROGMEM = {

Loading…
Cancel
Save