altosui: Add extra ignitors to graphable objects
[fw/altos] / altosui / AltosFlightStats.java
index b3ee14acc516cdc8e8e75bf0fb503e6ff8577648..d02a518d593f44fa72c8dce52ccd50293b3eff05 100644 (file)
 package altosui;
 
 import java.io.*;
-import org.altusmetrum.altoslib_2.*;
+import org.altusmetrum.altoslib_3.*;
 
 public class AltosFlightStats {
        double          max_height;
+       double          max_gps_height;
        double          max_speed;
        double          max_acceleration;
        double[]        state_speed = new double[Altos.ao_flight_invalid + 1];
@@ -41,6 +42,7 @@ public class AltosFlightStats {
        boolean         has_imu;
        boolean         has_mag;
        boolean         has_orient;
+       int             num_ignitor;
 
        double landed_time(AltosStateIterable states) {
                AltosState state = null;
@@ -153,6 +155,7 @@ public class AltosFlightStats {
                                max_height = state.max_height();
                                max_speed = state.max_speed();
                                max_acceleration = state.max_acceleration();
+                               max_gps_height = state.max_gps_height();
                        }
                        if (state.gps != null && state.gps.locked && state.gps.nsat >= 4) {
                                if (state_id <= Altos.ao_flight_pad) {
@@ -169,6 +172,8 @@ public class AltosFlightStats {
                                has_mag = true;
                        if (state.orient() != AltosLib.MISSING)
                                has_orient = true;
+                       if (state.ignitor_voltage != null && state.ignitor_voltage.length > num_ignitor)
+                               num_ignitor = state.ignitor_voltage.length;
                }
                for (int s = Altos.ao_flight_startup; s <= Altos.ao_flight_landed; s++) {
                        if (state_count[s] > 0) {