Skip to content

Commit

Permalink
misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Mar 11, 2022
1 parent 8d4c022 commit 8e3b8bd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
8 changes: 3 additions & 5 deletions Marlin/src/lcd/e3v2/proui/dwin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1511,9 +1511,7 @@ void DWIN_HandleScreen() {
break;
case Locked: HMI_LockScreen(); break;
case PrintDone:
#if HAS_ESDIAG
case ESDiagProcess:
#endif
TERN_(HAS_ESDIAG, case ESDiagProcess:)
case WaitResponse: HMI_WaitForUser(); break;
case Homing:
case PidProcess:
Expand Down Expand Up @@ -2150,7 +2148,7 @@ void SetPID(celsius_t t, heater_id_t h) {
}
#endif

#if HAS_HEATED_BED && ENABLED(PREHEAT_BEFORE_LEVELING)
#if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
void SetBedLevT() { SetPIntOnClick(BED_MINTEMP, BED_MAX_TARGET); }
#endif

Expand Down Expand Up @@ -3149,7 +3147,7 @@ void Draw_Move_Menu() {
EDIT_ITEM(ICON_ProbeOffsetX, GET_TEXT_F(MSG_ZPROBE_XOFFSET), onDrawPFloatMenu, SetProbeOffsetX, &probe.offset.x);
EDIT_ITEM(ICON_ProbeOffsetY, GET_TEXT_F(MSG_ZPROBE_YOFFSET), onDrawPFloatMenu, SetProbeOffsetY, &probe.offset.y);
EDIT_ITEM(ICON_ProbeOffsetZ, GET_TEXT_F(MSG_ZPROBE_ZOFFSET), onDrawPFloat2Menu, SetProbeOffsetZ, &probe.offset.z);
#if HAS_HEATED_BED && ENABLED(PREHEAT_BEFORE_LEVELING)
#if BOTH(HAS_HEATED_BED, PREHEAT_BEFORE_LEVELING)
EDIT_ITEM(ICON_Temperature, GET_TEXT_F(MSG_UBL_SET_TEMP_BED), onDrawPIntMenu, SetBedLevT, &HMI_data.BedLevT);
#endif
#ifdef BLTOUCH_HS_MODE
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/e3v2/proui/dwin_lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ void DWIN_Draw_Value(uint8_t bShow, bool signedMode, bool zeroFill, uint8_t zero
DWIN_Word(i, y);
// Write a big-endian 64 bit integer
const size_t p = i + 1;
for (char count = 8; count--;) { // 7..0
for (size_t count = 8; count--;) { // 7..0
++i;
DWIN_SendBuf[p + count] = value;
value >>= 8;
Expand Down
8 changes: 4 additions & 4 deletions Marlin/src/lcd/e3v2/proui/dwinui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ void (*DWINUI::onTitleDraw)(TitleClass* title)=nullptr;
void (*DWINUI::onMenuDraw)(MenuClass* menu)=nullptr;

void DWINUI::init() {
TERN_(DEBUG_DWIN, DEBUG_ECHOPGM("\r\nDWIN handshake ");)
TERN_(DEBUG_DWIN, SERIAL_ECHOPGM("\r\nDWIN handshake "));
delay(750); // Delay for wait to wakeup screen
TERN(DEBUG_DWIN, if (DWIN_Handshake()) DEBUG_ECHOLNPGM("ok."); else DEBUG_ECHOLNPGM("error."), DWIN_Handshake());
const bool hs = DWIN_Handshake();
TERN_(DEBUG_DWIN, SERIAL_ECHOLNF(hs ? F("ok.") : F("error.")));
DWIN_Frame_SetDir(1);
cursor.x = 0;
cursor.y = 0;
cursor.reset();
pencolor = Color_White;
textcolor = Def_Text_Color;
backcolor = Def_Background_Color;
Expand Down

0 comments on commit 8e3b8bd

Please sign in to comment.