Changes for ULA payload
Signed-off-by: Keith Packard <keithp@keithp.com>
#endif
#if defined(TELEMETRUM_V_1_2)
#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 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 SPI_CS_ON_P0 0
#define AO_M25_SPI_CS_MASK 0x02 /* CS0 is P1_1 */
#define M25_MAX_CHIPS 1
#define HAS_IGNITE 1
#define HAS_MONITOR 0
#endif
#define HAS_IGNITE 1
#define HAS_MONITOR 0
#endif
#error Please define HAS_ACCEL_REF
#endif
#else
#error Please define HAS_ACCEL_REF
#endif
#else
#define HAS_ACCEL_REF 0
#endif
#define HAS_ACCEL_REF 0
#endif
__pdata pres_t ao_sample_pres;
__pdata alt_t ao_sample_alt;
__pdata alt_t ao_sample_height;
__pdata pres_t ao_sample_pres;
__pdata alt_t ao_sample_alt;
__pdata alt_t ao_sample_height;
+#if HAS_ACCEL || HAS_ACCEL_REF
__pdata accel_t ao_sample_accel;
#endif
__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;
ao_sample_alt = pres_to_altitude(ao_sample_pres);
ao_sample_height = ao_sample_alt - ao_ground_height;
+#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);
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)
#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
ao_delay(AO_SEC_TO_TICKS(RADIO_DELAY_AFTER_BOOST));
#endif