altos: Rename telemetry to telemetry_orig
[fw/altos] / altosui / AltosTelemetryIterable.java
index a71ab8726d0dce64bf1b746e0e13e61e444c84b3..44e5ad8f8d9c2fe9977cd0550abf8ab67c8d9dc0 100644 (file)
@@ -28,6 +28,13 @@ public class AltosTelemetryIterable extends AltosRecordIterable {
                return records.iterator();
        }
 
+       boolean has_gps = false;
+       boolean has_accel = false;
+       boolean has_ignite = false;
+       public boolean has_gps() { return has_gps; }
+       public boolean has_accel() { return has_accel; }
+       public boolean has_ignite() { return has_ignite; };
+
        public AltosTelemetryIterable (FileInputStream input) {
                boolean saw_boost = false;
                int     current_tick = 0;
@@ -59,11 +66,16 @@ public class AltosTelemetryIterable extends AltosRecordIterable {
                                                saw_boost = true;
                                                boost_tick = record.tick;
                                        }
+                                       if (record.accel != AltosRecord.MISSING)
+                                               has_accel = true;
+                                       if (record.gps != null)
+                                               has_gps = true;
+                                       if (record.main != AltosRecord.MISSING)
+                                               has_ignite = true;
                                        records.add(record);
                                } catch (ParseException pe) {
                                        System.out.printf("parse exception %s\n", pe.getMessage());
                                } catch (AltosCRCException ce) {
-                                       System.out.printf("crc error\n");
                                }
                        }
                } catch (IOException io) {