From c6e6af4503d46da1b2c031a7effc533fc61c00b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 6 Sep 2021 17:46:41 -0500 Subject: [PATCH] post-merge --- Marlin/src/lcd/extui/dgus_reloaded.cpp | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Marlin/src/lcd/extui/dgus_reloaded.cpp b/Marlin/src/lcd/extui/dgus_reloaded.cpp index 4e722f9a5da4..ba8dc0711c31 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded.cpp @@ -35,9 +35,7 @@ namespace ExtUI { - void onStartup() { - dgus_screen_handler.Init(); - } + void onStartup() { dgus_screen_handler.Init(); } void onIdle() { static bool processing = false; @@ -55,21 +53,15 @@ namespace ExtUI { } void onMediaInserted() { - #if ENABLED(SDSUPPORT) - dgus_screen_handler.SDCardInserted(); - #endif + TERN_(SDSUPPORT, dgus_screen_handler.SDCardInserted()); } - void onMediaError() { - #if ENABLED(SDSUPPORT) - dgus_screen_handler.SDCardError(); - #endif + void onMediaError() { + TERN_(SDSUPPORT, dgus_screen_handler.SDCardError()); } - void onMediaRemoved() { - #if ENABLED(SDSUPPORT) - dgus_screen_handler.SDCardRemoved(); - #endif + void onMediaRemoved() { + TERN_(SDSUPPORT, dgus_screen_handler.SDCardRemoved()); } void onPlayTone(const uint16_t frequency, const uint16_t duration) { @@ -130,15 +122,14 @@ namespace ExtUI { #if HAS_MESH void onMeshLevelingStart() {} - + void onMeshUpdate(const int8_t xpos, const int8_t ypos, const_float_t zval) { dgus_screen_handler.MeshUpdate(xpos, ypos); } void onMeshUpdate(const int8_t xpos, const int8_t ypos, const probe_state_t state) { - if (state == G29_POINT_FINISH) { + if (state == G29_POINT_FINISH) dgus_screen_handler.MeshUpdate(xpos, ypos); - } } #endif