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/AltosTelemetryRecordRaw.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/AltosTelemetryRecordRaw.java')
-rw-r--r-- | altoslib/AltosTelemetryRecordRaw.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/altoslib/AltosTelemetryRecordRaw.java b/altoslib/AltosTelemetryRecordRaw.java index a06348c1..f94789bb 100644 --- a/altoslib/AltosTelemetryRecordRaw.java +++ b/altoslib/AltosTelemetryRecordRaw.java @@ -22,6 +22,7 @@ public class AltosTelemetryRecordRaw extends AltosTelemetryRecord { int serial; int tick; int type; + int rssi; long received_time; @@ -53,11 +54,12 @@ public class AltosTelemetryRecordRaw extends AltosTelemetryRecord { return AltosLib.string(bytes, off + 1, l); } - public AltosTelemetryRecordRaw(int[] in_bytes) { + public AltosTelemetryRecordRaw(int[] in_bytes, int in_rssi) { bytes = in_bytes; serial = uint16(0); tick = uint16(2); type = uint8(4); + rssi = in_rssi; } public AltosRecord update_state(AltosRecord previous) { @@ -69,6 +71,7 @@ public class AltosTelemetryRecordRaw extends AltosTelemetryRecord { next = new AltosRecordNone(); next.serial = serial; next.tick = tick; + next.rssi = rssi; return next; } |