altos: Make sure storage is setup before starting log
authorKeith Packard <keithp@keithp.com>
Mon, 10 Apr 2023 02:39:37 +0000 (19:39 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 10 Apr 2023 02:39:37 +0000 (19:39 -0700)
TeleGPS v3.0 uses internal eeprom for config, so storage wasn't
getting setup before doing the telegps-specific init bits. Instead of
worrying about it, just call ao_storage_setup at the top so that
storage is always ready to go.

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

index 53d6666929021c37e686074c64700fea699dae59..5a5f12c6d29b9159713208fda8d896e7edd15b77 100644 (file)
@@ -273,6 +273,8 @@ ao_log_scan(void)
        /* Get any existing flight number */
        ao_flight_number = ao_log_max_flight();
 
+       ao_storage_setup();
+
 #if FLIGHT_LOG_APPEND
 
        /* Deal with older OS versions which stored multiple