altos/telemega-v1.0: Adjust config params to make flight erase work
authorKeith Packard <keithp@keithp.com>
Sat, 7 Jun 2014 18:01:14 +0000 (11:01 -0700)
committerKeith Packard <keithp@keithp.com>
Sat, 7 Jun 2014 18:01:14 +0000 (11:01 -0700)
Flight erase records are supposed to be written after the ao_config to
eeprom in telemega. They were getting written in the middle of one of
the pyro channel config blocks. Put a bunch of space between the two
by making the config max 1024 bytes instead of 128 bytes.

Set the log erase marker to 0x55 -- eeprom comes from the factory as
0x00, so we use any value other than 0x55 to indicate 'unused' erase
slots.

Save space for more flight erase blocks; we've  got plenty.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/telemega-v1.0/ao_pins.h

index 7f0b1f948de4a544614dd6d55da4034f78186aec..77b753d1edb3083cf56c6d917f30154438da864f 100644 (file)
 #define ao_gps_fifo            (ao_stm_usart3.rx_fifo)
 
 #define AO_CONFIG_DEFAULT_FLIGHT_LOG_MAX       (1024 * 1024)
+#define AO_CONFIG_MAX_SIZE                     1024
+#define LOG_ERASE_MARK                         0x55
+#define LOG_MAX_ERASE                          128
+
 #define HAS_EEPROM             1
 #define USE_INTERNAL_FLASH     0
 #define USE_EEPROM_CONFIG      1