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:
26:166dbe6022e8
Parent:
24:db7494389c03
Child:
34:10550b327e3d
--- a/RotarySwitch.cpp	Wed Sep 05 10:15:52 2018 -0700
+++ b/RotarySwitch.cpp	Wed Sep 05 17:31:35 2018 +0000
@@ -102,20 +102,20 @@
    if (   (WHEEL_MODE_SELECT    == currentWheelState)
        || (WHEEL_SUBMODE_SELECT == currentWheelState))
    {
-     if (WHEEL_MODE_SELECT == currentWheelState)
-     {
         if (WheelCurrent > WheelPrevious)
         {
-           LED_status_index = ++LED_status_index % sizeof(LED_statuses);
+           if (WHEEL_MODE_SELECT == currentWheelState)
+              LED_status_index = ++LED_status_index % sizeof(LED_statuses);
            direction = 1;
         }
         else
             if (WheelCurrent < WheelPrevious)
             {
-               LED_status_index = --LED_status_index % sizeof(LED_statuses);
+               if (WHEEL_MODE_SELECT == currentWheelState)
+                  LED_status_index = --LED_status_index % sizeof(LED_statuses);
                direction = -1;
             }
-     }
+
      // Keep resetting WheelStateTimer as long as wheel is moving
      if (WheelPrevious != WheelCurrent)
         WheelStateTimer = 1;