altos: Force telemetry rate to 38400 when ao_force_freq is set
authorKeith Packard <keithp@keithp.com>
Fri, 5 Oct 2018 06:10:59 +0000 (23:10 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 5 Oct 2018 06:10:59 +0000 (23:10 -0700)
ao_force_freq is used by TeleMini to set the radio to known
values. As TeleMini v3.0 also has configurable telemetry rates, this
value also needs to be set back to a known value.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/kernel/ao_config.c

index 25634ffc3178ab88769867ae0d9b9b2df416cfcd..86d4838fbe8d6630a458c0904bf459e9aeb29ee8 100644 (file)
@@ -243,6 +243,9 @@ _ao_config_get(void)
        if (ao_force_freq) {
                ao_config.frequency = 434550;
                ao_config.radio_cal = ao_radio_cal;
+#if HAS_RADIO_RATE
+               ao_config.radio_rate = AO_CONFIG_DEFAULT_RADIO_RATE;
+#endif
                ao_xmemcpy(&ao_config.callsign, CODE_TO_XDATA(AO_CONFIG_DEFAULT_CALLSIGN),
                       sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
        }