X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_flight.c;h=782e22744c434dc28e9356d60708ef728f7e9380;hb=01f8df088759ee7e6bc3900a013e0ea4fafaf984;hp=64c95063ae9f5ea1e59a12dd6a2317d3e0be328e;hpb=b119e19604aa557a40e848c60d98a67b5f259bbd;p=fw%2Faltos diff --git a/src/core/ao_flight.c b/src/core/ao_flight.c index 64c95063..782e2274 100644 --- a/src/core/ao_flight.c +++ b/src/core/ao_flight.c @@ -94,7 +94,9 @@ ao_flight(void) if (ao_config.accel_plus_g == 0 || ao_config.accel_minus_g == 0 || ao_ground_accel < ao_config.accel_plus_g - ACCEL_NOSE_UP || - ao_ground_accel > ao_config.accel_minus_g + ACCEL_NOSE_UP) + ao_ground_accel > ao_config.accel_minus_g + ACCEL_NOSE_UP || + ao_ground_height < -1000 || + ao_ground_height > 7000) { /* Detected an accel value outside -1.5g to 1.5g * (or uncalibrated values), so we go into invalid mode @@ -122,7 +124,7 @@ ao_flight(void) ao_usb_disable(); #endif -#if !HAS_ACCEL +#if !HAS_ACCEL && PACKET_HAS_SLAVE /* Disable packet mode in pad state on TeleMini */ ao_packet_slave_stop(); #endif