projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcb801b
)
altoslib: Reset telem tracking state when switching altimeters
author
Keith Packard
<keithp@keithp.com>
Sun, 18 Nov 2012 18:13:49 +0000
(10:13 -0800)
committer
Keith Packard
<keithp@keithp.com>
Sun, 18 Nov 2012 18:13:49 +0000
(10:13 -0800)
This discards any local state when the new telem packet has a
different serial number
Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosTelemetryRecordRaw.java
patch
|
blob
|
history
diff --git
a/altoslib/AltosTelemetryRecordRaw.java
b/altoslib/AltosTelemetryRecordRaw.java
index c21da6fc1cbe26f87eb480f0ecf6fce9477cc6f0..51dd704dc81c319477af3b4416ca4238829f97ca 100644
(file)
--- a/
altoslib/AltosTelemetryRecordRaw.java
+++ b/
altoslib/AltosTelemetryRecordRaw.java
@@
-62,7
+62,8
@@
public class AltosTelemetryRecordRaw extends AltosTelemetryRecord {
public AltosRecord update_state(AltosRecord previous) {
AltosRecord next;
- if (previous != null)
+
+ if (previous != null && previous.serial == serial)
next = previous.clone();
else
next = new AltosRecordNone();