altos: Define AO_LOG_FORMAT in */ao_pins.h. Use in ao_cmd.c
authorKeith Packard <keithp@keithp.com>
Sun, 22 Oct 2017 20:43:07 +0000 (15:43 -0500)
committerKeith Packard <keithp@keithp.com>
Sun, 22 Oct 2017 20:43:07 +0000 (15:43 -0500)
Instead of having a global variable define the log format, use a macro
instead to save data space.

Signed-off-by: Keith Packard <keithp@keithp.com>
14 files changed:
src/cc1111/ao_pins.h
src/easymega-v1.0/ao_pins.h
src/kernel/ao_cmd.c
src/teleballoon-v2.0/ao_pins.h
src/telegps-v0.3/ao_pins.h
src/telegps-v1.0/ao_pins.h
src/telegps-v2.0/ao_pins.h
src/telemega-v0.1/ao_pins.h
src/telemega-v1.0/ao_pins.h
src/telemega-v2.0/ao_pins.h
src/telemetrum-v2.0/ao_pins.h
src/telemetrum-v3.0/ao_pins.h
src/telescience-v0.2/ao_pins.h
src/teleterra-v0.2/ao_pins.h

index 10b1f802c645d3c0790b0e10b4c5a83d3f87b736..9d6e1c1d7681576360c2170abf25b1ba709a5700 100644 (file)
@@ -63,6 +63,7 @@
        #define HAS_RADIO_RATE          0       /* not enough space for this */
        #define HAS_MUTEX_TRY           0
        #define HAS_TASK_INFO           0       /* not enough space for this either */
+       #define AO_LOG_FORMAT           AO_LOG_FORMAT_FULL
 #endif
 
 #if defined(TELEMETRUM_V_1_1)
        #define HAS_TELEMETRY           1
        #define HAS_RADIO_RATE          0       /* not enough space for this */
        #define HAS_MUTEX_TRY           0
+       #define AO_LOG_FORMAT           AO_LOG_FORMAT_FULL
 #endif
 
 #if defined(TELEMETRUM_V_1_2)
        #define HAS_TELEMETRY           1
        #define HAS_RADIO_RATE          0       /* not enough space for this */
        #define HAS_MUTEX_TRY           0
+       #define AO_LOG_FORMAT           AO_LOG_FORMAT_FULL
 #endif
 
 #if defined(TELEDONGLE_V_0_2)
        #define HAS_MONITOR             0
        #define HAS_TELEMETRY           1
        #define HAS_RADIO_RATE          0       /* not enough space for this */
+       #define AO_LOG_FORMAT           AO_LOG_FORMAT_TINY
 #endif
 
 #if defined(TELENANO_V_0_1)
        #define HAS_TELEMETRY           1
        #define HAS_RADIO_RATE          0       /* not enough space for this */
        #define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX        ((uint32_t) 127 * (uint32_t) 1024)
+       #define AO_LOG_FORMAT           AO_LOG_FORMAT_FULL
 #endif
 
 #if defined(TELEDONGLE_V_0_1)
index 42a8b09c4de723b1c767cc44e4478786e4fde1f7..b80164786ba1f88b61f8d6df17b1f2e7da03bde6 100644 (file)
@@ -69,6 +69,8 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMEGA
+
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
 #define USE_EEPROM_CONFIG      1
@@ -84,7 +86,7 @@
 #define HAS_SPI_1              1
 #define SPI_1_PA5_PA6_PA7      1       /* Barometer */
 #define SPI_1_PB3_PB4_PB5      1       /* Accelerometer, Gyro */
-#define SPI_1_PE13_PE14_PE15   0       
+#define SPI_1_PE13_PE14_PE15   0
 #define SPI_1_OSPEEDR          STM_OSPEEDR_10MHz
 
 #define HAS_SPI_2              1
index 881f3500ab7efd4c4d5dd992eef09269a3c0d11b..c1e9cef2cc901694a854b3d8a9f4d0c6e33eacda 100644 (file)
@@ -304,7 +304,7 @@ version(void)
               , ao_flight_number
 #endif
 #if HAS_LOG
-              , ao_log_format
+              , AO_LOG_FORMAT
 #if !DISABLE_LOG_SPACE
               , (unsigned long) ao_storage_log_max
 #endif
index 746bb3ee72c55085ab30c76ef76e5bfb1db0741d..d98e85d782521039d4b3576c40d48ac51d7f1d66 100644 (file)
@@ -64,6 +64,7 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMETRUM
 
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
index 28ae30a47da0d0501e2ddc787272da3dcf3d8d54..873474bbab3ac074a8aefd4389c2a1139c54cbfc 100644 (file)
@@ -75,6 +75,7 @@
 #define AO_CONFIG_DEFAULT_APRS_INTERVAL                0
 #define AO_CONFIG_DEFAULT_RADIO_POWER          0xc0
 #define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX       496 * 1024
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEGPS
 
 /*
  * GPS
index 9672ab037dbd8005b2c2efe2c9c78e2f8080f684..f3bdc0ac73f135360baaa9a5ae047dfded1b2f11 100644 (file)
@@ -77,6 +77,7 @@
 
 #define AO_CONFIG_DEFAULT_APRS_INTERVAL                0
 #define AO_CONFIG_DEFAULT_RADIO_POWER          0xc0
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEGPS
 
 /*
  * GPS
index fa175371b28f8835f462b9cb04ac17abf9bb3e07..a2e812fa51f5570762b07d0e1c8b16004ea0c9b1 100644 (file)
@@ -136,6 +136,7 @@ struct ao_adc {
 
 #define AO_CONFIG_DEFAULT_APRS_INTERVAL                0
 #define AO_CONFIG_DEFAULT_RADIO_POWER          0xc0
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEGPS
 
 /*
  * GPS
index 11c4267c9b2eb680bbd882b703dab1d5d097e61b..94e77f9864bce76cbd64887d0593a6e1bba907da 100644 (file)
@@ -69,6 +69,7 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMEGA
 
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
index 4decbbf7f64cfd13ef6b0916554a65475bc7b164..d44394f0aad381a684046ece8280b2de745321b4 100644 (file)
@@ -69,6 +69,7 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMEGA
 
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
index c7c8ad1931610aa11a265cd16536f4ed95e65b03..42c00c947924b53e354c29ee4331e4ead015c1ea 100644 (file)
@@ -69,6 +69,7 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMEGA
 
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
index d906317309db1c4ff7d30f91cf28f05198e22445..d26a5193950d50e5015cb3e02c3650a595e5249a 100644 (file)
@@ -64,6 +64,7 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMETRUM
 
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
index b937b4222f3c8f4e482910613540adf3ba9b606c..6d4369c92f1056b21b249c793b908f1d594f7a1a 100644 (file)
@@ -64,6 +64,7 @@
 #define AO_CONFIG_MAX_SIZE                     1024
 #define LOG_ERASE_MARK                         0x55
 #define LOG_MAX_ERASE                          128
+#define AO_LOG_FORMAT                          AO_LOG_FORMAT_TELEMETRUM
 
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
index c78766cdefa398847eec50df67418575d3696e50..29f16114062dac893e3680477affbf0da103e138 100644 (file)
 #define HAS_ADC                        1
 #define HAS_ADC_TEMP           1
 #define HAS_LOG                        1
+#define AO_LOG_FORMAT          AO_LOG_FORMAT_TELESCIENCE
 
 /*
  * SPI Flash memory
index 8d9f7a2f1c0f55b579140aa7bbd292d58d4ebc13..5bcf2c8a383c654d4db625e916127a0fa9cbd93b 100644 (file)
@@ -75,6 +75,8 @@
        #define HAS_TELEMETRY           0
 
        #define AO_VALUE_32             0
+
+       #define AO_LOG_FORMAT           AO_LOG_FORMAT_TELEMETRY
 #endif
 
 #if DBG_ON_P1