![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Charles Young's development fork. Going forward I only want to push mature code to main repository.
Fork of GEO_COUNTER_L432KC by
Diff: main.cpp
- Revision:
- 50:19ab5315e2b4
- Parent:
- 49:a67f2a3d228a
- Child:
- 51:6b916f91f4d9
--- a/main.cpp Sat Sep 08 16:42:53 2018 -0700 +++ b/main.cpp Sat Sep 08 16:45:45 2018 -0700 @@ -146,6 +146,8 @@ // Capture the counts early so they will be more accurate uint32_t Count1Save = Count1; uint32_t Count2Save = Count2; + Count1 = 0; + Count2 = 0; if(Stopped) { @@ -158,9 +160,6 @@ // Enable interrupts on rising edge of digital inputs TRIG1 & TRIG2 TRIG1.rise(&Count1_up); TRIG2.rise(&Count2_up); - - Count1 = 0; // clear both counters - Count2 = 0; } // This must be called periodically to update the LEDs