Skip to content
Snippets Groups Projects
Commit 0693767e authored by InsanityAutomation's avatar InsanityAutomation Committed by Scott Lahteine
Browse files

ExtUI Pause/Stop on all Pause/Stop (#15188)

parent 1c3a1ab2
No related branches found
No related tags found
No related merge requests found
...@@ -24,10 +24,6 @@ ...@@ -24,10 +24,6 @@
#include "../../module/printcounter.h" #include "../../module/printcounter.h"
#include "../../lcd/ultralcd.h" #include "../../lcd/ultralcd.h"
#if ENABLED(EXTENSIBLE_UI)
#include "../../lcd/extensible_ui/ui_api.h"
#endif
/** /**
* M75: Start print timer * M75: Start print timer
*/ */
...@@ -40,9 +36,6 @@ void GcodeSuite::M75() { ...@@ -40,9 +36,6 @@ void GcodeSuite::M75() {
*/ */
void GcodeSuite::M76() { void GcodeSuite::M76() {
print_job_timer.pause(); print_job_timer.pause();
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onPrintTimerPaused();
#endif
} }
/** /**
...@@ -50,9 +43,6 @@ void GcodeSuite::M76() { ...@@ -50,9 +43,6 @@ void GcodeSuite::M76() {
*/ */
void GcodeSuite::M77() { void GcodeSuite::M77() {
print_job_timer.stop(); print_job_timer.stop();
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onPrintTimerStopped();
#endif
} }
#if ENABLED(PRINTCOUNTER) #if ENABLED(PRINTCOUNTER)
......
...@@ -39,6 +39,9 @@ bool Stopwatch::stop() { ...@@ -39,6 +39,9 @@ bool Stopwatch::stop() {
#endif #endif
if (isRunning() || isPaused()) { if (isRunning() || isPaused()) {
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onPrintTimerStopped();
#endif
state = STOPPED; state = STOPPED;
stopTimestamp = millis(); stopTimestamp = millis();
return true; return true;
...@@ -52,6 +55,9 @@ bool Stopwatch::pause() { ...@@ -52,6 +55,9 @@ bool Stopwatch::pause() {
#endif #endif
if (isRunning()) { if (isRunning()) {
#if ENABLED(EXTENSIBLE_UI)
ExtUI::onPrintTimerPaused();
#endif
state = PAUSED; state = PAUSED;
stopTimestamp = millis(); stopTimestamp = millis();
return true; return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment