altosui: Parse and export Max flight log value
authorKeith Packard <keithp@keithp.com>
Wed, 30 Mar 2011 18:47:07 +0000 (11:47 -0700)
committerKeith Packard <keithp@keithp.com>
Wed, 30 Mar 2011 18:47:07 +0000 (11:47 -0700)
New configuration field might as well get dumped to the .csv files.

Signed-off-by: Keith Packard <keithp@keithp.com>
altosui/Altos.java
altosui/AltosEepromIterable.java
altosui/AltosEepromRecord.java

index 3ef4d79994dcaee73d31b7d9657ebf8fe4b2e4d7..1f791da5b8b0f77b7c7dcd8f28ca5aa549d3c6fe 100644 (file)
@@ -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_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;
 
        /* Added to flag invalid records */
        static final int AO_LOG_INVALID = -1;
index bb7c7bef17d34384c5a8af3e4d03e020942ad78c..a7fd742fc4e6424000de703387a4101ae13f5ea3 100644 (file)
@@ -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_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;
                        case Altos.AO_LOG_MANUFACTURER:
                                out.printf ("# Manufacturer: %s\n", record.data);
                                break;
index 5787af86e6d53fc60640bc35f803c7d71be2c931..52acb43568c11e48f3a43feb6fc7c475ef45187d 100644 (file)
@@ -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("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];
                                } else if (tokens[0].equals("manufacturer")) {
                                        cmd = Altos.AO_LOG_MANUFACTURER;
                                        data = tokens[1];