diff options
author | Keith Packard <keithp@keithp.com> | 2012-10-08 21:59:55 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2012-10-08 21:59:55 -0700 |
commit | 422799d9be36ef71b63c1c0fd80d5e76da802949 (patch) | |
tree | fca5dd05d49e7b58fbbef1faa5b6e817ed5ecdd7 /src | |
parent | d4b1dffeef3e9ea96e143f74782e4da7d116c0d4 (diff) |
altos: Compute desired frequency when upgrading from pre-1.1
Instead of just smashing the frequency to 434.550, compute the
frequency from the old radio channel value
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ao_config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/ao_config.c b/src/core/ao_config.c index ce855ad1..e8ff95b7 100644 --- a/src/core/ao_config.c +++ b/src/core/ao_config.c @@ -102,6 +102,7 @@ _ao_config_get(void) ao_xmemset(&ao_config.callsign, '\0', sizeof (ao_config.callsign)); ao_xmemcpy(&ao_config.callsign, CODE_TO_XDATA(AO_CONFIG_DEFAULT_CALLSIGN), sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1); + ao_config._legacy_radio_channel = 0; } minor = ao_config.minor; if (minor != AO_CONFIG_MINOR) { @@ -131,7 +132,7 @@ _ao_config_get(void) if (minor < 9) ao_xmemset(&ao_config.aes_key, '\0', AO_AES_LEN); if (minor < 10) - ao_config.frequency = 434550; + ao_config.frequency = 434550 + ao_config._legacy_radio_channel * 100; if (minor < 11) ao_config.apogee_lockout = 0; #if AO_PYRO_NUM |