Instead of waiting for the previous telemetry interval to expire,
immediately switch to the new telemetry rate. This will provide
more telemetry data early in the boost.
Signed-off-by: Keith Packard <keithp@keithp.com>
#endif
time += ao_telemetry_interval;
delay = time - ao_time();
#endif
time += ao_telemetry_interval;
delay = time - ao_time();
- if (delay > 0)
- ao_delay(delay);
+ if (delay > 0) {
+ ao_alarm(delay);
+ ao_sleep(&telemetry);
+ ao_clear_alarm();
+ }