X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altoslib%2FAltosTelemetryRecordSensor.java;h=d1d9dd7ec8e78f257c0fd6ed8172e1b78183628d;hb=93e66b4911b7285f9095712ef746571153c3f088;hp=92375fb0a64f22b548d24d17373f234b2f8c4980;hpb=5a3c5de6657d1c26e52015a8acec0cd05e294cef;p=fw%2Faltos diff --git a/altoslib/AltosTelemetryRecordSensor.java b/altoslib/AltosTelemetryRecordSensor.java index 92375fb0..d1d9dd7e 100644 --- a/altoslib/AltosTelemetryRecordSensor.java +++ b/altoslib/AltosTelemetryRecordSensor.java @@ -15,7 +15,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib; +package org.altusmetrum.altoslib_2; public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { @@ -36,10 +36,8 @@ public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { int accel_plus_g; int accel_minus_g; - int rssi; - - public AltosTelemetryRecordSensor(int[] in_bytes, int in_rssi) { - super(in_bytes); + public AltosTelemetryRecordSensor(int[] in_bytes, int rssi) { + super(in_bytes, rssi); state = uint8(5); accel = int16(6); @@ -57,8 +55,6 @@ public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { ground_accel = int16(26); accel_plus_g = int16(28); accel_minus_g = int16(30); - - rssi = in_rssi; } public AltosRecord update_state(AltosRecord prev) { @@ -74,7 +70,7 @@ public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { if (type == packet_type_TM_sensor) next.accel = accel; else - next.accel = AltosRecord.MISSING; + next.accel = AltosLib.MISSING; next.pres = pres; next.temp = temp; next.batt = v_batt; @@ -82,8 +78,8 @@ public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { next.drogue = sense_d; next.main = sense_m; } else { - next.drogue = AltosRecord.MISSING; - next.main = AltosRecord.MISSING; + next.drogue = AltosLib.MISSING; + next.main = AltosLib.MISSING; } next.kalman_acceleration = acceleration / 16.0; @@ -96,13 +92,11 @@ public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { next.accel_plus_g = accel_plus_g; next.accel_minus_g = accel_minus_g; } else { - next.ground_accel = AltosRecord.MISSING; - next.accel_plus_g = AltosRecord.MISSING; - next.accel_minus_g = AltosRecord.MISSING; + next.ground_accel = AltosLib.MISSING; + next.accel_plus_g = AltosLib.MISSING; + next.accel_minus_g = AltosLib.MISSING; } - next.rssi = rssi; - next.seen |= AltosRecord.seen_sensor | AltosRecord.seen_temp_volt; return next;