#endif
#if defined(TELEMETRUM_V_1_2)
+ #define RADIO_DELAY_AFTER_BOOST 40
#define HAS_FLIGHT 1
#define HAS_USB 1
#define HAS_BEEP 1
#define SPI_CS_ON_P0 0
#define AO_M25_SPI_CS_MASK 0x02 /* CS0 is P1_1 */
#define M25_MAX_CHIPS 1
- #define HAS_ACCEL 1
+ #define HAS_ACCEL 0
#define HAS_IGNITE 1
#define HAS_MONITOR 0
#endif
#error Please define HAS_ACCEL_REF
#endif
#else
+#ifndef HAS_ACCEL_REF
#define HAS_ACCEL_REF 0
#endif
+#endif
#endif /* HAS_ADC */
__pdata pres_t ao_sample_pres;
__pdata alt_t ao_sample_alt;
__pdata alt_t ao_sample_height;
-#if HAS_ACCEL
+#if HAS_ACCEL || HAS_ACCEL_REF
__pdata accel_t ao_sample_accel;
#endif
ao_sample_alt = pres_to_altitude(ao_sample_pres);
ao_sample_height = ao_sample_alt - ao_ground_height;
-#if HAS_ACCEL
+#if HAS_ACCEL || HAS_ACCEL_REF
ao_sample_accel = ao_data_accel_cook(ao_data);
if (ao_config.pad_orientation != AO_PAD_ORIENTATION_ANTENNA_UP)
ao_sample_accel = ao_data_accel_invert(ao_sample_accel);
#if RADIO_DELAY_AFTER_BOOST
while (ao_flight_state < ao_flight_boost)
- ao_sleep(&ao_flight_state);
+ ao_sleep(DATA_TO_XDATA(&ao_flight_state));
ao_delay(AO_SEC_TO_TICKS(RADIO_DELAY_AFTER_BOOST));
#endif