 /*---------------------------------------------------------------------------------------*/
 void Print7headers (bool processed)
 {
-    processed? Serial.print("processed data \t") : Serial.print("received data \t");
- #ifdef RC_SPEKTRUM
-    Serial.print("Time\t");
-    Serial.print("TURN\t");
-    Serial.print("AUTO\t");
-    Serial.print("GO\t");
-    Serial.print("Rudder\t");
-    Serial.print("E-Stop\t");
-    Serial.println("Reverse\t"); 
+  processed ? Serial.print("processed data \t") : Serial.print("received data \t");
+#ifdef RC_SPEKTRUM
+  Serial.print("Time\t");
+  Serial.print("TURN\t");
+  Serial.print("AUTO\t");
+  Serial.print("GO\t");
+  Serial.print("Rudder\t");
+  Serial.print("E-Stop\t");
+  Serial.println("Reverse\t");
 #endif
 
 #ifdef RC_HITEC
-    Serial.print("Time\t");
-    Serial.print("TURN\t");
-    Serial.print("AUTO\t");
-    Serial.print("GO\t");
-    Serial.print("E-Stop\t");
-    Serial.print("Rudder\t");
-    Serial.println("Reverse\t"); 
+  Serial.print("Time\t");
+  Serial.print("TURN\t");
+  Serial.print("AUTO\t");
+  Serial.print("GO\t");
+  Serial.print("E-Stop\t");
+  Serial.print("Rudder\t");
+  Serial.println("Reverse\t");
 #endif
 }
 /*---------------------------------------------------------------------------------------*/
 void Print7 (bool processed, unsigned long results[7])
 {
-  
-    processed? Serial.print("processed data \t") : Serial.print("received data \t");
-    Serial.print(results[0]); Serial.print("\t");
-    Serial.print(results[1]); Serial.print("\t");
-    Serial.print(results[2]); Serial.print("\t");
-    Serial.print(results[3]); Serial.print("\t");
-    Serial.print(results[4]); Serial.print("\t");
-    Serial.print(results[5]); Serial.print("\t");
-    Serial.println(results[6]);
+
+  processed ? Serial.print("processed data \t") : Serial.print("received data \t");
+  Serial.print(results[0]); Serial.print("\t");
+  Serial.print(results[1]); Serial.print("\t");
+  Serial.print(results[2]); Serial.print("\t");
+  Serial.print(results[3]); Serial.print("\t");
+  Serial.print(results[4]); Serial.print("\t");
+  Serial.print(results[5]); Serial.print("\t");
+  Serial.println(results[6]);
 }
 /*---------------------------------------------------------------------------------------*/
 void LogData(unsigned long commands[7], SerialData *sensors)  // data for spreadsheet
 {
-     show7seg(HubSpeed_kmPh);
-     /*Serial.print("(ms) Time\t");
-     Serial.print("(cm/s) Speed\t");
-     Serial.print("(km/h) Speed\t");
-     Serial.print("(km/h) Hub Speed\t");
-     Serial.print("(deg) Angle\t");
-     Serial.print("Right\t");
-     Serial.print("Left\t");
-     Serial.print("Throttle\t");
-     Serial.print("Brake\t");
-     Serial.print("Steer\t");
-     Serial.println("(m) Distance");*/
-     Serial.print(millis()); Serial.print("\t");                        //(ms) Time
-     Serial.print(sensors->speed_cmPs); Serial.print("\t");             //(cm/s) Speed
-     Serial.print(sensors->speed_cmPs*36.0/1000.); Serial.print("\t");  //(km/h) Speed
-     Serial.print(HubSpeed_kmPh); Serial.print("\t");                   //(km/h) Hub Speed
-     Serial.print(sensors->angle_deg); Serial.print("\t");              //(deg) Angle
-     int right = analogRead(A3);
-     int left = analogRead(A2);
-     Serial.print(right); Serial.print("\t");                           //Right turn sensor
-     Serial.print(left); Serial.print("\t");                            //Left turn sensor
-     Serial.print(throttle_control); Serial.print("\t");                //Throttle
-     Serial.print(brake_control); Serial.print("\t");                   //Brake
-     Serial.print(steer_control); Serial.print("\t");                   //Steer
-     Serial.println(Odometer_m);                                        //(m) Distance
-//     Print7 (true, commands);
-}
-/*---------------------------------------------------------------------------------------*/
-void PrintHeaders (void)
-{
-    Serial.print("(ms) Time\t");
+  show7seg(HubSpeed_kmPh);
+  /*Serial.print("(ms) Time\t");
     Serial.print("(cm/s) Speed\t");
     Serial.print("(km/h) Speed\t");
     Serial.print("(km/h) Hub Speed\t");

}
/*---------------------------------------------------------------------------------------*/
// Turn on any, none, or all of the decimals.
//  The six lowest bits in the decimals parameter sets a decimal 
//  (or colon, or apostrophe) on or off. A 1 indicates on, 0 off.
//  [MSB] (X)(X)(Apos)(Colon)(Digit 4)(Digit 3)(Digit2)(Digit1)
void setDecimals(byte decimals)

   I = integra;  change based on recent sum of errors
   D = derivative: change based on how error is changing.
   The controller needs to avoid problems of being too sluggish or too skittery.
   A sluggish control (overdamped) takes too long to reach the set-point.
   A skitterish control (underdamped) can overshoot, then undershoot, producing
   oscillations and jerky motion.
   Getting the right control is a matter of tuning right parts of P, I, and D,
   which is something of a black art.
   For more information, search for:
   VanDoren Proportional Integral Derivative Control
*/
{
  static int  throttle_control = MIN_ACC_OUT;
  static int  brake_control = MAX_BRAKE_OUT;
  static int error_index = 0;
