 }
 
 void LapStarted(){
-  if( !startMode ){
-    lastLapTime = timeElapsed;
+  if( startMode ){
+    lastLapTime = defaultLapTime;
   }
   else{
-    lastLapTime = baseLapTime;
+    lastLapTime = currentFrameTime;
   }
+  
+  lapLapTimeRatio = 1.0f * lastLapTime / baseLapTime;
   
   startMode = false;
   currentFrameTime = lastFrameTime = timeElapsed = 0;


void setup(){
  pinMode(detectorPin, INPUT );
  lastLapTime = baseLapTime;
}

bool HasCrossedTime(unsigned long time){
  return ( lastFrameTime < time ) && ( time <= currentFrameTime );
}


#define detectorPin 2
#define resetPin 1

unsigned long minPossibleLapTime = 40000;
unsigned long baseLapTime = 86200;
unsigned long defaultLapTime = 86200;

unsigned long c1 = 30+250;
unsigned long c2 = 5760+250;
unsigned long c3 = 14120;
unsigned long c4 = 32280;
unsigned long c5 = 47440;
unsigned long c6 = 59440;
unsigned long c7 = 77200+2000;

elapsedMillis timeElapsed; 
unsigned long currentFrameTime;
unsigned long lastLapTime;
unsigned long lastFrameTime;

float lapLapTimeRatio = 1.0;

byte TURN = BLUE;

