Fix some DGUS bugs
- No action on first click of the move button
This commit is contained in:
parent
e7f3b625b0
commit
cbf349b5eb
4 changed files with 8 additions and 5 deletions
|
@ -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)
|
||||
if (movevalue) {
|
||||
const uint16_t choice = *(uint16_t*)var.memadr;
|
||||
movevalue = movevalue > 0 ? choice : -choice;
|
||||
movevalue = movevalue < 0 ? -choice : choice;
|
||||
}
|
||||
#endif
|
||||
char axiscode;
|
||||
unsigned int speed = 1500; //FIXME: get default feedrate for manual moves, dont hardcode.
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
|
@ -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 = {
|
||||
|
|
Reference in a new issue