Charles Young's development fork. Going forward I only want to push mature code to main repository.

Dependencies:   mbed

Fork of GEO_COUNTER_L432KC by Geo Electronics "Geo Counter"

Revision:
43:f330ec39b8b4
Parent:
42:204c99cf3fde
--- a/RotarySwitch.cpp	Thu Sep 06 10:53:42 2018 -0700
+++ b/RotarySwitch.cpp	Thu Sep 06 10:59:42 2018 -0700
@@ -111,8 +111,6 @@
       // only report back mode once selected
       if (WHEEL_SUBMODE_SELECT == currentWheelState)
          LED_status_reported = LED_status_index;
-      else // don't report anything if not in submode
-         LED_status_reported = LED_status_index_size;
       
      // Keep resetting WheelStateTimer as long as wheel is moving
      if (WheelPrevious != WheelCurrent)
@@ -120,6 +118,10 @@
    }
    WheelPrevious = WheelCurrent;
 
+   if (WHEEL_INACTIVE == currentWheelState)
+      // report invalid if not in submode
+      LED_status_reported = LED_status_index_size;
+
    // detect when wheel button is pressed but wait until it is released
    // before doing anything
    bool QEPBbutton = QEPB.read();