 float baroData[3]; //Char buffers for storing sensor data
 unsigned long timeData[2];
 
-int accelZBuffer[5] = {0,0,0,0,0};
-float baroAltBuffer[5] = {0,0,0,0,0};
-int gyroZBuffer[7] = {0,0,0,0,0,0,0}; //The other values are arbitrary; this one is used in Simpsons Rule, so it MUST BE ODD!
-unsigned long timeBuffer[7] = {0,0,0,0,0,0,0}; //Must equal the size of gyroZBuffer; used for the same calculations.
+int accelZBuffer[5] = {0, 0, 0, 0, 0};
+float baroAltBuffer[5] = {0, 0, 0, 0, 0};
+int gyroZBuffer[7] = {0, 0, 0, 0, 0, 0, 0}; //The other values are arbitrary; this one is used in Simpsons Rule, so it MUST BE ODD!
+unsigned long timeBuffer[7] = {0, 0, 0, 0, 0, 0, 0}; //Must equal the size of gyroZBuffer; used for the same calculations.
 
 byte accelAverage;
 byte baroAverage;

    if(rotationCounter > 2) {
      finState = !finState;
      digitalWrite(inputB, finState);
      endRollFlag = true;
    }
  }
  else { //At this point, continue to make adjustments to prevent roll
    if(abs(event.gyro.z) < MIN_ROLL_THRESHOLD)
    {
      digitalWrite(inputA, HIGH);
      servoHomeFlag = true;
    }

  sensors_event_t event;
  bmp.getEvent(&event);
  startAlt = bmp.pressureToAltitude(seaLevelPressure, event.pressure); //Set starting altitude for later reference


  flightState = waiting; //Initialize switch variable
}
