Browse Source

Fix some DGUS bugs

- No action on first click of the move button
George Fu 4 years ago
parent
commit
cbf349b5eb

+ 5
- 2
Marlin/src/lcd/extui/lib/dgus/DGUSDisplay.cpp View File

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

+ 1
- 1
Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSDisplayDef.cpp View File

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

+ 1
- 1
Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSDisplayDef.cpp View File

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

+ 1
- 1
Marlin/src/lcd/extui/lib/dgus/origin/DGUSDisplayDef.cpp View File

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

Loading…
Cancel
Save