diff options
author | Keith Packard <keithp@keithp.com> | 2013-04-02 16:44:58 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-04-02 16:44:58 -0700 |
commit | 997cdef3fe04acdd566d287e70981f7b7934d0c8 (patch) | |
tree | c66a843a9910add9df89cf68149c8f7ea06ea749 /altoslib/AltosTelemetryRecordSensor.java | |
parent | 0cd203e418e73a1f11460425985b7575c2f0a76c (diff) |
altoslib: Make any incoming telem packet update the RSSI value
Every packet has RSSI info, so use the latest one available. This
makes telegps RSSI available as it never sends sensor packets (having
no sensors).
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosTelemetryRecordSensor.java')
-rw-r--r-- | altoslib/AltosTelemetryRecordSensor.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/altoslib/AltosTelemetryRecordSensor.java b/altoslib/AltosTelemetryRecordSensor.java index 767a464a..e0e92c13 100644 --- a/altoslib/AltosTelemetryRecordSensor.java +++ b/altoslib/AltosTelemetryRecordSensor.java @@ -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) { @@ -101,8 +97,6 @@ public class AltosTelemetryRecordSensor extends AltosTelemetryRecordRaw { next.accel_minus_g = AltosRecord.MISSING; } - next.rssi = rssi; - next.seen |= AltosRecord.seen_sensor | AltosRecord.seen_temp_volt; return next; |