Minh Nguyen / Pushbutton
Revision:
10:17af93056d39
Parent:
9:7dd8100b2ba5
Child:
11:c3c72344ce95
--- a/Pushbutton.cpp	Wed Mar 24 01:47:27 2021 +0000
+++ b/Pushbutton.cpp	Wed Mar 24 23:38:53 2021 +0000
@@ -68,7 +68,7 @@
                     *mode = OP_MANUAL_ALL;
                     return;
                 }
-                else if(*mode == OP_MANUAL_ALL || *mode == OP_WSETTING || *mode == OP_CONFIRM || *mode == OP_POWER_OFF || *mode == OP_ATRACK)
+                else if(*mode == OP_MANUAL_ALL || *mode == OP_WSETTING || *mode == OP_CONFIRM || *mode == OP_POWER_OFF || *mode == OP_ATRACK ||*mode == OP_RECONNECT)
                 {
                     *mode = OP_NORMAL;
                     return;
@@ -95,6 +95,8 @@
         
         if(button2.read() && connected)
             *mode = OP_ATRACK;
+        else if(button2.read() && !connected)
+            *mode = OP_RECONNECT;
         else
             *mode = OP_WSETTING;
         return;