X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosDataPointReader.java;h=4335421c21a96922e0ef0f3bf6f3026efcdcfb3f;hb=bf1c7df5301a1727e871a8447f835fe75bdce3fc;hp=7704310b6f676ba9e3abfb5eae0a7ee6a9e6e2e6;hpb=51c7741040d95c5deece939dae5e4136cc04afc4;p=fw%2Faltos diff --git a/altosui/AltosDataPointReader.java b/altosui/AltosDataPointReader.java index 7704310b..4335421c 100644 --- a/altosui/AltosDataPointReader.java +++ b/altosui/AltosDataPointReader.java @@ -14,10 +14,18 @@ class AltosDataPointReader implements Iterable { Iterator iter; AltosState state; AltosRecord record; + boolean has_gps; + boolean has_accel; + boolean has_ignite; - public AltosDataPointReader(Iterable reader) { + final static int MISSING = AltosRecord.MISSING; + + public AltosDataPointReader(AltosRecordIterable reader) { this.iter = reader.iterator(); this.state = null; + has_accel = reader.has_accel(); + has_gps = reader.has_gps(); + has_ignite = reader.has_ignite(); } private void read_next_record() @@ -44,7 +52,7 @@ class AltosDataPointReader implements Iterable { public double acceleration() { return record.acceleration(); } public double pressure() { return record.raw_pressure(); } public double altitude() { return record.raw_altitude(); } - public double height() { return record.raw_height(); } + public double height() { return record.raw_height(); } public double accel_speed() { return record.accel_speed(); } public double baro_speed() { return state.baro_speed; } public double temperature() { return record.temperature(); }