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:
59:f96a503bd228
Parent:
58:d15adb224e5a
Child:
60:6ae1a2390600
--- a/main.cpp	Sat Sep 08 21:30:11 2018 -0700
+++ b/main.cpp	Sat Sep 08 21:35:13 2018 -0700
@@ -168,12 +168,6 @@
       TRIG1.rise(NULL);      
       TRIG2.rise(NULL); 
    }
-   else
-   {
-      // Enable interrupts on rising edge of digital inputs TRIG1 & TRIG2
-      TRIG1.rise(&Count1_up);     
-      TRIG2.rise(&Count2_up);         
-   }
 
    // This must be called periodically to update the LEDs
    ModeSwitch.UpdateOutput();
@@ -276,6 +270,12 @@
        && (!StartStopPressed))
    {
       StartStopPressed = true;
+      if (Stopped)
+      {
+         // Enable interrupts on rising edge of digital inputs TRIG1 & TRIG2
+         TRIG1.rise(&Count1_up);     
+         TRIG2.rise(&Count2_up);         
+      }
       Stopped=!Stopped;           // toggle status
    }
    else