             Serial.println((int)recvByte);
             break;
         }
-    }
-#endif
-}
+        checkBarometerDataIntegrity();
+
+    }
+#endif
+}
+
 
 void validateAck(byte ackResponse) {
     boolean correctResponse = (ackResponse == ackVal);

#if ROLE == ROLE_GROUND
#define HEARTBEAT_INTERVAL_MILLIS 300
// Altitude is in feet
#define ALTITUDE_TARGET_THRESH_FEET 10

// can be digital pinsa
uint8_t triggerButtonPin = A0;


// Should be a PWM pin
uint8_t servoPin = 5;
uint8_t resetPin = 9;
Servo actuationServo;

float lastAltitudes[ALTITUDE_SMOOTHING];
