   ComputeSpeed (&history);
   //   PrintSpeed(&history);
 
-  Odometer_m += (float)(LOOP_TIME_US * SpeedCyclometer_mmPs) / MEG;
+  Odometer_m += (float)(LOOP_TIME_MS * SpeedCyclometer_mmPs) / 1000.0;
   // Since Results have not been cleared, angle information will also be sent.
   Results->speed_cmPs = SpeedCyclometer_mmPs / 10;
 //  Results->write(&Serial3);  // Send speed to C6

/*---------------------------------------------------------------------------------------*/

// Time at which this loop pass should end in order to maintain a
// loop period of LOOP_TIME_US.
unsigned long nextTime = micros();
// Time at which we reach the end of loop(), which should be before
// nextTime if we have set the loop period long enough.
unsigned long endTime;

    speed_errors[i] = 0;
  }

  //setupWheelRev(); // WheelRev4 addition
  CalibrateTurnAngle(32, 20);
  calibrationTime_ms = millis();

  attachInterrupt(digitalPinToInterrupt(IRPT_TURN),  ISR_TURN_rise,  RISING);
  //attachInterrupt(digitalPinToInterrupt(IRPT_RDR),   ISR_RDR_rise,   RISING);
