diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 95a7bd572a..058391caea 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -113,8 +113,8 @@ Requires a sensor from above Melzi board users may only select ABL_BI for bilinear leveling */ -//#define ABL_BI -#define ABL_UBL +#define ABL_BI +//#define ABL_UBL //#define POWER_LOSS_RECOVERY //Large and does not fit with any other features on Melzi, or UBL on Atmega /* diff --git a/Marlin/src/gcode/stats/M75-M78.cpp b/Marlin/src/gcode/stats/M75-M78.cpp index d8589031ed..85d36daa9b 100644 --- a/Marlin/src/gcode/stats/M75-M78.cpp +++ b/Marlin/src/gcode/stats/M75-M78.cpp @@ -24,10 +24,6 @@ #include "../../module/printcounter.h" #include "../../lcd/ultralcd.h" -#if ENABLED(EXTENSIBLE_UI) - #include "../../lcd/extensible_ui/ui_api.h" -#endif - /** * M75: Start print timer */ @@ -40,9 +36,6 @@ void GcodeSuite::M75() { */ void GcodeSuite::M76() { print_job_timer.pause(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onPrintTimerPaused(); - #endif } /** @@ -50,9 +43,6 @@ void GcodeSuite::M76() { */ void GcodeSuite::M77() { print_job_timer.stop(); - #if ENABLED(EXTENSIBLE_UI) - ExtUI::onPrintTimerStopped(); - #endif } #if ENABLED(PRINTCOUNTER) diff --git a/Marlin/src/libs/stopwatch.cpp b/Marlin/src/libs/stopwatch.cpp index 6a6ea03c1b..5ba6e5f95e 100644 --- a/Marlin/src/libs/stopwatch.cpp +++ b/Marlin/src/libs/stopwatch.cpp @@ -24,6 +24,10 @@ #include "../inc/MarlinConfig.h" +#if ENABLED(EXTENSIBLE_UI) + #include "../lcd/extensible_ui/ui_api.h" +#endif + Stopwatch::State Stopwatch::state; millis_t Stopwatch::accumulator; millis_t Stopwatch::startTimestamp; @@ -34,6 +38,10 @@ bool Stopwatch::stop() { Stopwatch::debug(PSTR("stop")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onPrintTimerStopped(); + #endif + if (isRunning() || isPaused()) { state = STOPPED; stopTimestamp = millis(); @@ -46,7 +54,9 @@ bool Stopwatch::pause() { #if ENABLED(DEBUG_STOPWATCH) Stopwatch::debug(PSTR("pause")); #endif - + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onPrintTimerPaused(); + #endif if (isRunning()) { state = PAUSED; stopTimestamp = millis(); @@ -60,6 +70,10 @@ bool Stopwatch::start() { Stopwatch::debug(PSTR("start")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onPrintTimerStarted(); + #endif + if (!isRunning()) { if (isPaused()) accumulator = duration(); else reset(); diff --git a/Marlin/src/module/printcounter.cpp b/Marlin/src/module/printcounter.cpp index 5bcd49845f..0eabb80ec4 100644 --- a/Marlin/src/module/printcounter.cpp +++ b/Marlin/src/module/printcounter.cpp @@ -294,6 +294,9 @@ bool PrintCounter::stop() { #if ENABLED(DEBUG_PRINTCOUNTER) debug(PSTR("stop")); #endif + #if ENABLED(EXTENSIBLE_UI) + ExtUI::onPrintTimerStopped(); + #endif if (super::stop()) { data.finishedPrints++;