projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7b0b6bc
)
altos: Report latest telemetry data, rather than using the oldest
author
Keith Packard
<keithp@keithp.com>
Tue, 1 May 2012 18:08:49 +0000
(11:08 -0700)
committer
Keith Packard
<keithp@keithp.com>
Tue, 1 May 2012 18:08:49 +0000
(11:08 -0700)
ao_sample_adc points to the *next* ADC entry, rather than the most
recent one. Step back one entry to get the latest valid data.
Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_telemetry.c
patch
|
blob
|
history
diff --git
a/src/core/ao_telemetry.c
b/src/core/ao_telemetry.c
index eb614b0f766a53eb237d6f619f8b4d9183f35899..46d726095a35c63b6fbbd6a1ee33fd94645798ca 100644
(file)
--- a/
src/core/ao_telemetry.c
+++ b/
src/core/ao_telemetry.c
@@
-53,8
+53,7
@@
static __xdata union ao_telemetry_all telemetry;
static void
ao_send_sensor(void)
{
- uint8_t sample;
- sample = ao_sample_adc;
+ uint8_t sample = ao_adc_ring_prev(ao_sample_adc);
telemetry.generic.tick = ao_adc_ring[sample].tick;
telemetry.generic.type = AO_TELEMETRY_SENSOR;