Browse Source

Plane: changed arm check method to use new is_flying code

master
Tom Pittenger 10 years ago committed by Andrew Tridgell
parent
commit
8f7bb61a54
  1. 4
      ArduPlane/ArduPlane.pde

4
ArduPlane/ArduPlane.pde

@ -1561,7 +1561,7 @@ static void determine_is_flying(void)
gps.ground_speed() >= 5); gps.ground_speed() >= 5);
if(ahrs.get_armed()) { if(arming.is_armed()) {
// when armed, we need overwhelming evidence that we ARE NOT flying // when armed, we need overwhelming evidence that we ARE NOT flying
isFlyingBool = airspeedMovement || gpsMovement; isFlyingBool = airspeedMovement || gpsMovement;
@ -1576,7 +1576,7 @@ static void determine_is_flying(void)
static bool is_flying(void) static bool is_flying(void)
{ {
if(ahrs.get_armed()) { if(arming.is_armed()) {
// when armed, assume we're flying unless we probably aren't // when armed, assume we're flying unless we probably aren't
return (isFlyingProbability >= 0.1); return (isFlyingProbability >= 0.1);
} }

Loading…
Cancel
Save