altos: Fix up telemetry delay computations
authorKeith Packard <keithp@keithp.com>
Sun, 26 Oct 2014 02:56:25 +0000 (19:56 -0700)
committerKeith Packard <keithp@keithp.com>
Sun, 26 Oct 2014 02:56:25 +0000 (19:56 -0700)
commit4d51570ed8776461d084726149923c5be43d622e
treed99254e629b098d77e19f5fac81319ce5cfe85e7
parentc831f1ffb378c20b7513d209d60cdd5dee9db85b
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>
src/kernel/ao_config.c
src/kernel/ao_telemetry.c
src/kernel/ao_telemetry.h