     int left = analogRead(A2);
     //Serial.print("Left"); Serial.print("\t"); Serial.println(left);
     //Serial.print("Right"); Serial.print("\t"); Serial.println(right);
-    if ((RIGHT_MIN_COUNT <= right) && (right <= RIGHT_MAX_COUNT))
+    if ((Right_Min_Count <= right) && (right <= Right_Max_Count))
        OK_right = true;    
-    if ((LEFT_MIN_COUNT <= left) && (left <= LEFT_MAX_COUNT))
+    if ((Left_Min_Count <= left) && (left <= Left_Max_Count))
        OK_left = true;    
-    long right_degx1000 = (right - RIGHT_STRAIGHT_A3) * RIGHT_DEGx1000pCOUNT;  
-    long left_degx1000  = (left -  LEFT_STRAIGHT_A2) *  LEFT_DEGx1000pCOUNT;  
+    long right_degx1000 = (right - RightStraight_A3) * RIGHT_DEGx1000pCOUNT;  
+    long left_degx1000  = (left -  LeftStraight_A2) *  LEFT_DEGx1000pCOUNT;  
  
-    expected_turn_degx1000 = 2 * old_turn_degx1000 - (older_turn_degx1000);
+    expected_turn_degx1000 = old_turn_degx1000; 
     if (OK_left && OK_right)
     {  // use the median
         if (right_degx1000 < left_degx1000)

#endif
//  D3 = Int 1  Wheel Click

// globals
long sensor_speed_mmPs = 0;
long drive_speed_mmPs = 0;
char IncomingMessage[BUFFER_SIZE];
int  InIndex=0;
int  throttle_control = MinimumThrottle;
int  brake_control = FullBrake;
// int  steer_control = Straight;
long speed_errors[ERROR_HISTORY];
/*================Read Turn Angle=================*/
long old_turn_degx1000, older_turn_degx1000;
long expected_turn_degx1000;

void ISR_TURN_rise() {
  noInterrupts();
  ProcessRiseOfINT(RC_TURN);

    //Serial.print("loop elapsed time = ");
    //Serial.println(elapsedTime);
    
    LogData(local_results, &Results);  // data for spreadsheet
    
    calibrationTime_ms += LOOP_TIME_MS;
    straightTime_ms = (steer_control == STRAIGHT_TURN_OUT)? straightTime_ms + LOOP_TIME_MS: 0;
    stoppedTime_ms = (throttle_control == MIN_ACC_OUT)? stoppedTime_ms + LOOP_TIME_MS: 0;
    if (calibrationTime_ms > 40000 && straightTime_ms > 3000 && stoppedTime_ms > 3000)
    {
         int oldBrake = brake_control;
         brake(MAX_BRAKE_OUT);  // put on brakes
         CalibrateTurnAngle(16, 10);  // WARNING: No response to controls while calibrating
         brake(oldBrake);       // restore brake state
         calibrationTime_ms = 0;
    }
    
    // Did we spend long enough in the loop that we should immediately
    // start the next pass?
