summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2014-06-13 00:01:46 -0700
committerKeith Packard <keithp@keithp.com>2014-06-13 00:01:46 -0700
commit07baa7596b36cf808cd1ee26ff158b1cf8585294 (patch)
tree020fdcee00defd551cf1d614c99fdf57959be7f7
parentf49540acd48292bd9f68ded647561d0e800c619d (diff)
altoslib: Call state.set_serial first for telemetry parsing
If we ever get around to supporting multiple simultaneous remote devices, we'll need to notice that the serial changed right away Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--altoslib/AltosTelemetry.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/altoslib/AltosTelemetry.java b/altoslib/AltosTelemetry.java
index 62948378..8182ec6b 100644
--- a/altoslib/AltosTelemetry.java
+++ b/altoslib/AltosTelemetry.java
@@ -43,9 +43,9 @@ public abstract class AltosTelemetry implements AltosStateUpdate {
}
public void update_state(AltosState state) {
+ state.set_serial(serial);
if (state.state == AltosLib.ao_flight_invalid)
state.set_state(AltosLib.ao_flight_startup);
- state.set_serial(serial);
state.set_tick(tick);
state.set_rssi(rssi, status);
state.set_received_time(received_time);