             }
             else
             {  // accelerating; should get new data soon
-                if(data->nowTime_ms - data->oldTime_ms > MaxTickTime_ms)
-                {  // too long without getting a tick
-                    SpeedCyclometer_mmPs = 0;
-                    SpeedCyclometer_revPs = 0;
+               
+            }
+            if(data->nowTime_ms - data->oldTime_ms > MaxTickTime_ms)
+            {  // too long without getting a tick
+                SpeedCyclometer_mmPs = 0;
+                SpeedCyclometer_revPs = 0;
+                if(data->nowTime_ms - data->oldTime_ms > 2 * MaxTickTime_ms)
+                {
+                    InterruptState = IRQ_FIRST;  //  Invalidate old data
+                    data->oldSpeed_mmPs = NO_DATA;
+                    data->olderSpeed_mmPs = NO_DATA;
                 }
             }
         }

   interrupts();
   
   ComputeSpeed (&history);
    
    Odometer_m += (float)(LOOP_TIME_MS * SpeedCyclometer_mmPs) / MEG;
// Since Results have not been cleared, angle information will also be sent.


#include <SPI.h>
#include <Elcano_Serial.h>
#define LOOP_TIME_MS 400
#define ERROR_HISTORY 20

// Orange Trike
