* - pad mode if we're upright,
* - idle mode otherwise
*/
-#if HAS_ACCEL
- 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)
- {
- /* Detected an accel value outside -1.5g to 1.5g
- * (or uncalibrated values), so we go into invalid mode
- */
- ao_flight_state = ao_flight_invalid;
-
- /* Turn on packet system in invalid mode on TeleMetrum */
- ao_packet_slave_start();
- } else
-#endif
- if (!ao_flight_force_idle
-#if HAS_ACCEL
- && ao_ground_accel < ao_config.accel_plus_g + ACCEL_NOSE_UP
-#endif
- )
+ if (!ao_flight_force_idle)
{
/* Set pad mode - we can fly! */
ao_flight_state = ao_flight_pad;
ao_usb_disable();
#endif
-#if !HAS_ACCEL
- /* Disable packet mode in pad state on TeleMini */
+ /* Disable packet mode in pad state */
ao_packet_slave_stop();
-#endif
/* Turn on telemetry system */
ao_rdf_set(1);
/* Set idle mode */
ao_flight_state = ao_flight_idle;
-#if HAS_ACCEL
- /* Turn on packet system in idle mode on TeleMetrum */
- ao_packet_slave_start();
-#endif
-
/* signal successful initialization by turning off the LED */
ao_led_off(AO_LED_RED);
}