From a9df9fc257eb2d7038d66ac7c2539aae4474bf12 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 30 Mar 2011 11:47:07 -0700 Subject: [PATCH] altosui: Parse and export Max flight log value New configuration field might as well get dumped to the .csv files. Signed-off-by: Keith Packard --- altosui/Altos.java | 9 +++++---- altosui/AltosEepromIterable.java | 3 +++ altosui/AltosEepromRecord.java | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/altosui/Altos.java b/altosui/Altos.java index 3ef4d799..1f791da5 100644 --- a/altosui/Altos.java +++ b/altosui/Altos.java @@ -44,10 +44,11 @@ public class Altos { static final int AO_LOG_CALLSIGN = 1004; static final int AO_LOG_ACCEL_CAL = 1005; static final int AO_LOG_RADIO_CAL = 1006; - static final int AO_LOG_MANUFACTURER = 1007; - static final int AO_LOG_PRODUCT = 1008; - static final int AO_LOG_SERIAL_NUMBER = 1009; - static final int AO_LOG_SOFTWARE_VERSION = 1010; + static final int AO_LOG_MAX_FLIGHT_LOG = 1007; + static final int AO_LOG_MANUFACTURER = 2000; + static final int AO_LOG_PRODUCT = 2001; + static final int AO_LOG_SERIAL_NUMBER = 2002; + static final int AO_LOG_SOFTWARE_VERSION = 9999; /* Added to flag invalid records */ static final int AO_LOG_INVALID = -1; diff --git a/altosui/AltosEepromIterable.java b/altosui/AltosEepromIterable.java index bb7c7bef..a7fd742f 100644 --- a/altosui/AltosEepromIterable.java +++ b/altosui/AltosEepromIterable.java @@ -281,6 +281,9 @@ public class AltosEepromIterable extends AltosRecordIterable { case Altos.AO_LOG_RADIO_CAL: out.printf ("# Radio cal: %d\n", record.a); break; + case Altos.AO_LOG_MAX_FLIGHT_LOG: + out.printf ("# Max flight log: %d\n", record.a); + break; case Altos.AO_LOG_MANUFACTURER: out.printf ("# Manufacturer: %s\n", record.data); break; diff --git a/altosui/AltosEepromRecord.java b/altosui/AltosEepromRecord.java index 5787af86..52acb435 100644 --- a/altosui/AltosEepromRecord.java +++ b/altosui/AltosEepromRecord.java @@ -131,6 +131,9 @@ public class AltosEepromRecord { } else if (tokens[0].equals("Radio") && tokens[1].equals("cal:")) { cmd = Altos.AO_LOG_RADIO_CAL; a = Integer.parseInt(tokens[2]); + } else if (tokens[0].equals("Max") && tokens[1].equals("flight") && tokens[2].equals("log:")) { + cmd = Altos.AO_LOG_MAX_FLIGHT_LOG; + a = Integer.parseInt(tokens[3]); } else if (tokens[0].equals("manufacturer")) { cmd = Altos.AO_LOG_MANUFACTURER; data = tokens[1]; -- 2.30.2