diff options
author | Keith Packard <keithp@keithp.com> | 2012-05-27 17:24:09 -0600 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-05-27 17:24:09 -0600 |
commit | ce8153472069ed56b24ac36f297ac569d1f767d4 (patch) | |
tree | 5162696d765800ccc6ffe1018de395745e908df8 /src/stm/ao_adc_stm.c | |
parent | ed635545e0b965901032ed2c3474ffe997c73de3 (diff) |
altos: Make telemetrum-v1.1 compile with new ao_data structure
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm/ao_adc_stm.c')
-rw-r--r-- | src/stm/ao_adc_stm.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/stm/ao_adc_stm.c b/src/stm/ao_adc_stm.c index 02187205..ea9e25e4 100644 --- a/src/stm/ao_adc_stm.c +++ b/src/stm/ao_adc_stm.c @@ -104,14 +104,22 @@ ao_adc_poll(void) void ao_adc_get(__xdata struct ao_adc *packet) { +#if HAS_FLIGHT + uint8_t i = ao_data_ring_prev(ao_sample_data); +#else uint8_t i = ao_data_ring_prev(ao_data_head); +#endif memcpy(packet, (void *) &ao_data_ring[i].adc, sizeof (struct ao_adc)); } void ao_data_get(__xdata struct ao_data *packet) { +#if HAS_FLIGHT + uint8_t i = ao_data_ring_prev(ao_sample_data); +#else uint8_t i = ao_data_ring_prev(ao_data_head); +#endif memcpy(packet, (void *) &ao_data_ring[i], sizeof (struct ao_data)); } |