From af52b9553bb5d09f3c7cfd89c3d738de98ba551f Mon Sep 17 00:00:00 2001
From: Jan Grewe <jan@faked.org>
Date: Wed, 1 May 2019 13:33:20 +0200
Subject: [PATCH] allow one-click restart when stopping while paused

---
 WINDER_ADV.ino | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/WINDER_ADV.ino b/WINDER_ADV.ino
index 06655fb..4c52762 100644
--- a/WINDER_ADV.ino
+++ b/WINDER_ADV.ino
@@ -234,6 +234,7 @@ void handleSwEvent(AceButton *button, uint8_t eventType,
     {
     case W_LEFT:
     case W_RIGHT:
+    case W_PAUSE:
       Serial.println(">>Stop Winding<<");
       StopWind = true;
       Continue = false;
@@ -248,6 +249,7 @@ void handleSwEvent(AceButton *button, uint8_t eventType,
     Serial.println("SW CLICK");
     pwr_led.Reset();
     Continue = true;
+    StopWind = false;
     switch (WState)
     {
     case W_IDLE:
-- 
GitLab