From 96444c1e0e6a1c179d9695b454012d0b16d0a76c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 27 Dec 2022 21:32:39 -0800 Subject: [PATCH] ao-tools: Update ao-eeprom for TeleMega v6 Add new log file format; no other changes needed here. Signed-off-by: Keith Packard --- ao-tools/ao-eeprom/ao-eeprom.c | 2 ++ ao-tools/lib/ao-eeprom-read.h | 1 + 2 files changed, 3 insertions(+) diff --git a/ao-tools/ao-eeprom/ao-eeprom.c b/ao-tools/ao-eeprom/ao-eeprom.c index d9b33195..8650f38d 100644 --- a/ao-tools/ao-eeprom/ao-eeprom.c +++ b/ao-tools/ao-eeprom/ao-eeprom.c @@ -355,6 +355,7 @@ main (int argc, char **argv) break; case AO_LOG_FORMAT_TELEMEGA_4: case AO_LOG_FORMAT_TELEMEGA_5: + case AO_LOG_FORMAT_TELEMEGA_6: len = 32; max_adc= 4095; adc_ref = 3.3; @@ -428,6 +429,7 @@ main (int argc, char **argv) case AO_LOG_FORMAT_EASYMEGA_2: case AO_LOG_FORMAT_TELEMEGA_4: case AO_LOG_FORMAT_TELEMEGA_5: + case AO_LOG_FORMAT_TELEMEGA_6: log_mega = (struct ao_log_mega *) &eeprom->data[pos]; switch (log_mega->type) { case AO_LOG_FLIGHT: diff --git a/ao-tools/lib/ao-eeprom-read.h b/ao-tools/lib/ao-eeprom-read.h index a103824b..01c2ef35 100644 --- a/ao-tools/lib/ao-eeprom-read.h +++ b/ao-tools/lib/ao-eeprom-read.h @@ -47,6 +47,7 @@ #define AO_LOG_FORMAT_TELEMEGA_4 19 /* 32 byte typed telemega records with 32 bit gyro cal and Bmx160 */ #define AO_LOG_FORMAT_EASYMOTOR 20 /* 16 byte typed easymotor records with pressure sensor and adxl375 */ #define AO_LOG_FORMAT_TELEMEGA_5 21 /* 32 byte typed telemega records with 32 bit gyro cal, mpu6000 and mmc5983 */ +#define AO_LOG_FORMAT_TELEMEGA_6 22 /* 32 byte typed telemega records with 32 bit gyro cal, bmi088 and mmc5983 */ #define AO_LOG_FORMAT_NONE 127 /* No log at all */ enum ao_pyro_flag { -- 2.30.2