summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cc1111/ao_pins.h5
-rw-r--r--src/core/ao_sample.c4
-rw-r--r--src/core/ao_telemetry.c2
3 files changed, 7 insertions, 4 deletions
diff --git a/src/cc1111/ao_pins.h b/src/cc1111/ao_pins.h
index fc6ed3ec..c502b5ed 100644
--- a/src/cc1111/ao_pins.h
+++ b/src/cc1111/ao_pins.h
@@ -91,6 +91,7 @@
#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
@@ -121,7 +122,7 @@
#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
@@ -523,8 +524,10 @@
#error Please define HAS_ACCEL_REF
#endif
#else
+#ifndef HAS_ACCEL_REF
#define HAS_ACCEL_REF 0
#endif
+#endif
#endif /* HAS_ADC */
diff --git a/src/core/ao_sample.c b/src/core/ao_sample.c
index 6461def0..5fe99b05 100644
--- a/src/core/ao_sample.c
+++ b/src/core/ao_sample.c
@@ -34,7 +34,7 @@ __pdata uint16_t ao_sample_tick; /* time of last data */
__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
@@ -139,7 +139,7 @@ ao_sample(void)
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);
diff --git a/src/core/ao_telemetry.c b/src/core/ao_telemetry.c
index 5a1b3d1d..8385c6d0 100644
--- a/src/core/ao_telemetry.c
+++ b/src/core/ao_telemetry.c
@@ -285,7 +285,7 @@ ao_telemetry(void)
#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