From 62aa51f0b785bea146d1e9331e6253de2d547c94 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 7 Jun 2014 11:01:14 -0700 Subject: [PATCH] altos/telemega-v1.0: Adjust config params to make flight erase work 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 --- src/telemega-v1.0/ao_pins.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/telemega-v1.0/ao_pins.h b/src/telemega-v1.0/ao_pins.h index 7f0b1f94..77b753d1 100644 --- a/src/telemega-v1.0/ao_pins.h +++ b/src/telemega-v1.0/ao_pins.h @@ -65,6 +65,10 @@ #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 -- 2.30.2