altos: Allow flight support without logging
authorKeith Packard <keithp@keithp.com>
Thu, 28 May 2020 23:03:23 +0000 (16:03 -0700)
committerKeith Packard <keithp@keithp.com>
Thu, 28 May 2020 23:03:23 +0000 (16:03 -0700)
EasyTimer flies rockets, but doesn't have SPI flash for logging.

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

index d1c049ac78aaf5b03905dc13542905f74cb01d71..9bc19038d6c6c82e65c4251d8ddf44ca8499cc06 100644 (file)
@@ -269,7 +269,7 @@ version(void)
        printf("manufacturer     %s\n"
               "product          %s\n"
               "serial-number    %u\n"
-#if HAS_FLIGHT || HAS_TRACKER
+#if HAS_LOG && (HAS_FLIGHT || HAS_TRACKER)
               "current-flight   %u\n"
 #endif
 #if HAS_LOG
@@ -287,7 +287,7 @@ version(void)
               , ao_manufacturer
               , ao_product
               , ao_serial_number
-#if HAS_FLIGHT || HAS_TRACKER
+#if HAS_LOG && (HAS_FLIGHT || HAS_TRACKER)
               , ao_flight_number
 #endif
 #if HAS_LOG
index bd2e95ef6a56f1feeb260beb410f527482f092a8..e4fc73c99059aadac5c7e9360f702a43770fb7d6 100644 (file)
@@ -86,7 +86,7 @@ _ao_config_put(void)
        ao_config_setup();
        ao_config_erase();
        ao_config_write(0, &ao_config, sizeof (ao_config));
-#if HAS_FLIGHT
+#if HAS_FLIGHT && HAS_LOG
        ao_log_write_erase(0);
 #endif
        ao_config_flush();