projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make RDF beacon only run on pad and after landing.
[fw/altos]
/
src
/
ao_telemetry.c
diff --git
a/src/ao_telemetry.c
b/src/ao_telemetry.c
index 7eefee3c2ea7554a494bdf0c0c29f77c032e7b23..d52e589c78a3ea245df37ef36a30bfa7d43973d2 100644
(file)
--- a/
src/ao_telemetry.c
+++ b/
src/ao_telemetry.c
@@
-21,7
+21,8
@@
__xdata uint16_t ao_telemetry_interval = 0;
__xdata uint8_t ao_rdf = 0;
__xdata uint16_t ao_rdf_time;
__xdata uint8_t ao_rdf = 0;
__xdata uint16_t ao_rdf_time;
-#define AO_RDF_INTERVAL AO_SEC_TO_TICKS(3)
+#define AO_RDF_INTERVAL_TICKS AO_SEC_TO_TICKS(5)
+#define AO_RDF_LENGTH_MS 500
void
ao_telemetry(void)
void
ao_telemetry(void)
@@
-51,8
+52,8
@@
ao_telemetry(void)
if (ao_rdf &&
(int16_t) (ao_time() - ao_rdf_time) >= 0)
{
if (ao_rdf &&
(int16_t) (ao_time() - ao_rdf_time) >= 0)
{
- ao_rdf_time = ao_time() + AO_RDF_INTERVAL;
- ao_radio_rdf();
+ ao_rdf_time = ao_time() + AO_RDF_INTERVAL
_TICKS
;
+ ao_radio_rdf(
AO_RDF_LENGTH_MS
);
ao_delay(ao_telemetry_interval);
}
}
ao_delay(ao_telemetry_interval);
}
}
@@
-71,6
+72,8
@@
ao_rdf_set(uint8_t rdf)
ao_rdf = rdf;
if (rdf == 0)
ao_radio_rdf_abort();
ao_rdf = rdf;
if (rdf == 0)
ao_radio_rdf_abort();
+ else
+ ao_rdf_time = ao_time();
}
__xdata struct ao_task ao_telemetry_task;
}
__xdata struct ao_task ao_telemetry_task;