Fix some DGUS bugs
- No action on first click of the move button
This commit is contained in:
parent
e7f3b625b0
commit
cbf349b5eb
@ -443,6 +443,7 @@ void DGUSScreenVariableHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variab
|
|||||||
|
|
||||||
void DGUSScreenVariableHandler::SDCardInserted() {
|
void DGUSScreenVariableHandler::SDCardInserted() {
|
||||||
top_file = 0;
|
top_file = 0;
|
||||||
|
filelist.refresh();
|
||||||
auto cs = ScreenHandler.getCurrentScreen();
|
auto cs = ScreenHandler.getCurrentScreen();
|
||||||
if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS)
|
if (cs == DGUSLCD_SCREEN_MAIN || cs == DGUSLCD_SCREEN_STATUS)
|
||||||
ScreenHandler.GotoScreen(DGUSLCD_SCREEN_SDFILELIST);
|
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);
|
int16_t movevalue = swap16(*(uint16_t*)val_ptr);
|
||||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||||
|
if (movevalue) {
|
||||||
const uint16_t choice = *(uint16_t*)var.memadr;
|
const uint16_t choice = *(uint16_t*)var.memadr;
|
||||||
movevalue = movevalue > 0 ? choice : -choice;
|
movevalue = movevalue < 0 ? -choice : choice;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
char axiscode;
|
char axiscode;
|
||||||
unsigned int speed = 1500; //FIXME: get default feedrate for manual moves, dont hardcode.
|
unsigned int speed = 1500; //FIXME: get default feedrate for manual moves, dont hardcode.
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include "../../../../ultralcd.h"
|
#include "../../../../ultralcd.h"
|
||||||
|
|
||||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||||
uint16_t distanceToMove = 0.1;
|
uint16_t distanceToMove = 10;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint16_t VPList_Boot[] PROGMEM = {
|
const uint16_t VPList_Boot[] PROGMEM = {
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
#include "../../../../ultralcd.h"
|
#include "../../../../ultralcd.h"
|
||||||
|
|
||||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||||
uint16_t distanceToMove = 0.1;
|
uint16_t distanceToMove = 10;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint16_t VPList_Boot[] PROGMEM = {
|
const uint16_t VPList_Boot[] PROGMEM = {
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
#include "../../../../ultralcd.h"
|
#include "../../../../ultralcd.h"
|
||||||
|
|
||||||
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
#if ENABLED(DGUS_UI_MOVE_DIS_OPTION)
|
||||||
uint16_t distanceToMove = 0.1;
|
uint16_t distanceToMove = 10;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const uint16_t VPList_Boot[] PROGMEM = {
|
const uint16_t VPList_Boot[] PROGMEM = {
|
||||||
|
Loading…
Reference in New Issue
Block a user