Skip to content

Commit

Permalink
Pause printing by press and start only by clicking start btn in Print…
Browse files Browse the repository at this point in the history
… mode
  • Loading branch information
lo1ol committed Jul 11, 2024
1 parent ad53a64 commit 22ae7cb
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/Modes/PrintMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,16 @@ void PrintMode::process() {
gDisplay[1] >> gTimer.afterLastResume();

if (!m_triggerByHold) {
if (gStartBtn.press()) {
if (gStartBtn.press() && gTimer.state() == Timer::RUNNING) {
if (gTimer.pause()) {
appendPrintLog(gTimer.afterLastResume());
}

gStartBtn.ignoreTillPressing();
}

if (gStartBtn.click()) {
switch (gTimer.state()) {
case Timer::RUNNING:
if (gTimer.pause())
appendPrintLog(gTimer.afterLastResume());
break;
case Timer::PAUSED:
gTimer.resume();
break;
Expand Down

0 comments on commit 22ae7cb

Please sign in to comment.