From: Keith Packard Date: Wed, 12 Feb 2020 21:00:18 +0000 (-0800) Subject: altos: Create new log format for TeleMega v4 X-Git-Tag: android-26~15 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=ea4140a81dc4ec6e541512ed70861691b57c4904 altos: Create new log format for TeleMega v4 Has BMX160 instead of MPU9250 Signed-off-by: Keith Packard --- diff --git a/src/kernel/ao_log.h b/src/kernel/ao_log.h index 97bfdc32..1c0ba4e3 100644 --- a/src/kernel/ao_log.h +++ b/src/kernel/ao_log.h @@ -58,6 +58,7 @@ extern enum ao_flight_state ao_log_state; #define AO_LOG_FORMAT_EASYMEGA_2 16 /* 32 byte typed telemega records with 32 bit gyro cal, mpu9250 rotated 90° and adxl375 */ #define AO_LOG_FORMAT_TELESTATIC 17 /* 32 byte typed telestatic records */ #define AO_LOG_FORMAT_MICROPEAK2 18 /* 2-byte baro values with header */ +#define AO_LOG_FORMAT_TELEMEGA_4 19 /* 32 byte typed telemega records with 32 bit gyro cal and Bmx160 */ #define AO_LOG_FORMAT_NONE 127 /* No log at all */ /* Return the flight number from the given log slot, 0 if none, -slot on failure */ @@ -504,7 +505,7 @@ struct ao_log_gps { } u; }; -#if AO_LOG_FORMAT == AO_LOG_FOMAT_TELEMEGA_OLD || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA_3 || AO_LOG_FORMAT == AO_LOG_FORMAT_EASYMEGA_2 +#if AO_LOG_FORMAT == AO_LOG_FOMAT_TELEMEGA_OLD || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA_3 || AO_LOG_FORMAT == AO_LOG_FORMAT_EASYMEGA_2 || AO_LOG_FORMAT == AO_LOG_FORMAT_TELEMEGA_4 typedef struct ao_log_mega ao_log_type; #endif diff --git a/src/telemega-v4.0/ao_pins.h b/src/telemega-v4.0/ao_pins.h index 47dfd015..8f044316 100644 --- a/src/telemega-v4.0/ao_pins.h +++ b/src/telemega-v4.0/ao_pins.h @@ -69,7 +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_3 +#define AO_LOG_FORMAT AO_LOG_FORMAT_TELEMEGA_4 #define HAS_EEPROM 1 #define USE_INTERNAL_FLASH 0