summaryrefslogtreecommitdiff
path: root/src/kernel/ao_config.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-07-05 00:09:25 -0700
committerKeith Packard <keithp@keithp.com>2014-07-05 00:38:09 -0700
commitea5887027e7a39da2b7d84a142d74950b7a24703 (patch)
tree1ec137c8f668861d1e53cbe9d5fbf18afeb9656e /src/kernel/ao_config.c
parent214a38eb2b084baec526aa42016eddb954038639 (diff)
altos: Call ao_telemetry_reset_interval when telemetry rate changes
This lets the radio code adjust the telemetry packet sending pattern when the data rate changes. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel/ao_config.c')
-rw-r--r--src/kernel/ao_config.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/kernel/ao_config.c b/src/kernel/ao_config.c
index 52c0c4f6..32a0967c 100644
--- a/src/kernel/ao_config.c
+++ b/src/kernel/ao_config.c
@@ -492,6 +492,10 @@ ao_config_radio_cal_set(void) __reentrant
#endif
#if HAS_RADIO_RATE
+#ifndef HAS_TELEMETRY
+#error Please define HAS_TELEMETRY
+#endif
+
void
ao_config_radio_rate_show(void) __reentrant
{
@@ -510,6 +514,9 @@ ao_config_radio_rate_set(void) __reentrant
}
_ao_config_edit_start();
ao_config.radio_rate = ao_cmd_lex_i;
+#if HAS_TELEMETRY
+ ao_telemetry_reset_interval();
+#endif
_ao_config_edit_finish();
}
#endif