diff options
author | Keith Packard <keithp@keithp.com> | 2014-10-25 19:56:25 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2014-10-25 19:56:25 -0700 |
commit | 4d51570ed8776461d084726149923c5be43d622e (patch) | |
tree | d99254e629b098d77e19f5fac81319ce5cfe85e7 /src/kernel/ao_telemetry.h | |
parent | c831f1ffb378c20b7513d209d60cdd5dee9db85b (diff) |
altos: Fix up telemetry delay computations
With RDF, APRS and telemetry all being sent at varying rates,
computing when to send the next radio data is not as simple as sending
telemetry and then figuring out whether to send RDF and/or APRS.
Fix this by computing times for the next telemetry/rdf/aprs packet,
and only sending each when that time has passed. Compute the delay
until the next radio activity as the minimum time to any transmission.
This also adds code to the config bits to reset the radio times
whenever something changes that might affect which radio data to send
next.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_telemetry.h')
-rw-r--r-- | src/kernel/ao_telemetry.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kernel/ao_telemetry.h b/src/kernel/ao_telemetry.h index 340c388e..711e0d36 100644 --- a/src/kernel/ao_telemetry.h +++ b/src/kernel/ao_telemetry.h @@ -120,6 +120,12 @@ struct ao_telemetry_location { #define HAS_WIDE_GPS 1 #endif +#ifdef HAS_TELEMETRY +#ifndef HAS_RDF +#define HAS_RDF 1 +#endif +#endif + #if HAS_WIDE_GPS typedef int32_t gps_alt_t; #define AO_TELEMETRY_LOCATION_ALTITUDE(l) (((gps_alt_t) (l)->altitude_high << 16) | ((l)->altitude_low)) |