altos: Reset config version if it's too large as well
authorKeith Packard <keithp@keithp.com>
Wed, 28 Mar 2012 05:53:08 +0000 (22:53 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 28 Mar 2012 05:53:08 +0000 (22:53 -0700)
Any future config values will get trashed if we down grade the
firmware, so we must reset the firmware version whenever it gets
written.

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

index 6fcebe1e8c4b9347183e77b8105ddc82071b3821..350ebcbe66d5721a509e71ab48f6ff02ea788388 100644 (file)
@@ -91,7 +91,7 @@ _ao_config_get(void)
                       sizeof(AO_CONFIG_DEFAULT_CALLSIGN) - 1);
                ao_config_dirty = 1;
        }
-       if (ao_config.minor < AO_CONFIG_MINOR) {
+       if (ao_config.minor != AO_CONFIG_MINOR) {
                /* Fixups for minor version 1 */
                if (ao_config.minor < 1)
                        ao_config.apogee_delay = AO_CONFIG_DEFAULT_APOGEE_DELAY;