Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MKS H43 Fix bug #21500

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
aa595f5
Merge pull request #1 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 11, 2020
d5d325c
Merge pull request #2 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 13, 2020
d8d5c0f
Merge pull request #4 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 14, 2020
a1055dd
Merge pull request #6 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 18, 2020
8b349b1
Merge pull request #7 from MarlinFirmware/bugfix-2.0.x
makerbase-mks May 22, 2020
8c42e50
Merge pull request #14 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jun 27, 2020
626ed70
Merge pull request #15 from MarlinFirmware/bugfix-2.0.x
makerbase-mks Jul 1, 2020
80a2552
Merge pull request #16 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Jul 2, 2020
1f7bbbd
Merge pull request #36 from MarlinFirmware/bugfix-2.0.x
MKS-Sean Dec 31, 2020
b499a24
Merge pull request #44 from MarlinFirmware/bugfix-2.0.x
solawc Mar 6, 2021
c18642a
Merge pull request #45 from MarlinFirmware/bugfix-2.0.x
solawc Mar 8, 2021
953ea35
Merge pull request #46 from MarlinFirmware/bugfix-2.0.x
solawc Mar 11, 2021
eb4d1de
Merge pull request #47 from MarlinFirmware/bugfix-2.0.x
solawc Mar 17, 2021
1b5dc86
Merge pull request #48 from MarlinFirmware/bugfix-2.0.x
solawc Mar 26, 2021
cb15340
Merge pull request #49 from MarlinFirmware/bugfix-2.0.x
solawc Apr 1, 2021
f4e89ea
fix bug
solawc Apr 1, 2021
5f5afd1
close DGUS_LCD_UI_MKS
solawc Apr 1, 2021
5305718
fix
solawc Apr 1, 2021
c76ed1c
fix
solawc Apr 1, 2021
a742f9c
Update DGUSScreenHandler.cpp
thinkyhead Apr 2, 2021
e78ee89
Update DGUSScreenHandler.cpp
thinkyhead Apr 2, 2021
d3595c1
Update DGUSScreenHandler.h
thinkyhead Apr 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2374,7 +2374,7 @@
//#define DGUS_LCD_UI_FYSETC
//#define DGUS_LCD_UI_HIPRECY

// #define DGUS_LCD_UI_MKS
//#define DGUS_LCD_UI_MKS
#if ENABLED(DGUS_LCD_UI_MKS)
#define USE_MKS_GREEN_UI
#endif
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ void DGUSScreenHandler::DGUSLCD_SendStringToDisplayPGM(DGUS_VP_Variable &var) {
#if HAS_PID_HEATING
void DGUSScreenHandler::DGUSLCD_SendTemperaturePID(DGUS_VP_Variable &var) {
float value = *(float *)var.memadr;
value /= 10;
float valuesend = 0;
switch (var.VP) {
default: return;
Expand Down Expand Up @@ -343,7 +344,6 @@ void DGUSScreenHandler::DGUSLCD_SendHeaterStatusToDisplay(DGUS_VP_Variable &var)
SetupConfirmAction(nullptr);
GotoScreen(DGUSLCD_SCREEN_POPUP);
}

#endif // SDSUPPORT

void DGUSScreenHandler::ScreenConfirmedOK(DGUS_VP_Variable &var, void *val_ptr) {
Expand Down
9 changes: 6 additions & 3 deletions Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#endif

uint16_t manualMoveStep = 1;
float distanceFilament = 10;
uint16_t distanceFilament = 10;
uint16_t FilamentSpeed = 25;
float ZOffset_distance = 0.1;
float mesh_adj_distance = 0.01;
Expand Down Expand Up @@ -554,7 +554,7 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
#if ENABLED(DGUS_FILAMENT_LOADUNLOAD)
VPHELPER(VP_LOAD_Filament, nullptr, &ScreenHandler.MKS_FilamentLoad, nullptr),
VPHELPER(VP_UNLOAD_Filament, nullptr, &ScreenHandler.MKS_FilamentUnLoad, nullptr),
VPHELPER(VP_Filament_distance, &distanceFilament, &ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<0>),
VPHELPER(VP_Filament_distance, &distanceFilament, &ScreenHandler.GetManualFilament, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
VPHELPER(VP_Filament_speed, &FilamentSpeed, &ScreenHandler.GetManualFilamentSpeed, ScreenHandler.DGUSLCD_SendWordValueToDisplay),
#endif
#endif
Expand Down Expand Up @@ -733,8 +733,9 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {


// SDCard File listing
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),

#if ENABLED(SDSUPPORT)
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.DGUSLCD_SD_FileSelected, nullptr),
VPHELPER(VP_SD_ScrollEvent, nullptr, ScreenHandler.DGUSLCD_SD_ScrollFilelist, nullptr),
VPHELPER(VP_SD_FileSelectConfirm, nullptr, ScreenHandler.DGUSLCD_SD_StartPrint, nullptr),
VPHELPER_STR(VP_SD_FileName0, nullptr, VP_SD_FileName_LEN, nullptr, ScreenHandler.DGUSLCD_SD_SendFilename),
Expand All @@ -759,6 +760,8 @@ const struct DGUS_VP_Variable ListOfVP[] PROGMEM = {
VPHELPER(VP_OFFSET_Y, &probe.offset.y, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
VPHELPER(VP_OFFSET_Z, &probe.offset.z, ScreenHandler.GetOffsetValue,ScreenHandler.DGUSLCD_SendFloatAsLongValueToDisplay<2>),
#endif
#else
VPHELPER(VP_SD_FileSelected, nullptr, ScreenHandler.PrintReturn, nullptr),
#endif

#if ENABLED(DGUS_UI_WAITING)
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/lcd/extui/lib/dgus/mks/DGUSDisplayDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#define MKS_FINSH

extern uint16_t manualMoveStep;
extern float distanceFilament;
extern uint16_t distanceFilament;
extern uint16_t FilamentSpeed;
extern float ZOffset_distance;
extern float mesh_adj_distance;
Expand All @@ -55,7 +55,7 @@ void MKS_resume_print_move();

extern float z_offset_add;

xyz_int_t tmc_step;
extern xyz_int_t tmc_step;

extern uint16_t lcd_default_light;

Expand Down
7 changes: 6 additions & 1 deletion Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ void DGUSScreenHandler::DGUSLCD_SendTMCStepValue(DGUS_VP_Variable &var) {
GotoScreen(MKSLCD_SCREEN_PrintDone);
}

#else
void DGUSScreenHandler::PrintReturn(DGUS_VP_Variable& var, void *val_ptr) {
uint16_t value = swap16(*(uint16_t*)val_ptr);
if (value == 0x0F) GotoScreen(DGUSLCD_SCREEN_MAIN);
}
#endif // SDSUPPORT

void DGUSScreenHandler::ScreenChangeHook(DGUS_VP_Variable &var, void *val_ptr) {
Expand Down Expand Up @@ -1215,7 +1220,7 @@ void DGUSScreenHandler::MKS_FilamentLoadUnload(DGUS_VP_Variable &var, void *val_
}
else {
#if EITHER(HAS_MULTI_HOTEND, SINGLENOZZLE)
swap_tool = 2;
swap_tool = 1;
#endif
}
#endif
Expand Down
7 changes: 5 additions & 2 deletions Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,14 @@ class DGUSScreenHandler {
static void GetManualFilamentSpeed(DGUS_VP_Variable &var, void *val_ptr);
#endif

// File touched.
static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr);

#if ENABLED(SDSUPPORT)
// Callback for VP "Display wants to change screen when there is a SD card"
static void ScreenChangeHookIfSD(DGUS_VP_Variable &var, void *val_ptr);
// Scroll buttons on the file listing screen.
static void DGUSLCD_SD_ScrollFilelist(DGUS_VP_Variable &var, void *val_ptr);
// File touched.
static void DGUSLCD_SD_FileSelected(DGUS_VP_Variable &var, void *val_ptr);
// start print after confirmation received.
static void DGUSLCD_SD_StartPrint(DGUS_VP_Variable &var, void *val_ptr);
// User hit the pause, resume or abort button.
Expand All @@ -183,6 +184,8 @@ class DGUSScreenHandler {
static void SDCardError();
// Marlin informed us about SD print completion.
static void SDPrintingFinished();
#else
static void PrintReturn(DGUS_VP_Variable &var, void *val_ptr);
#endif

// OK Button the Confirm screen.
Expand Down