summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
8dbe8ab)
A previous change discarded previous *telemetry* state, but failed to
discard any previous overall flight state. This would reset some of
the data fields, but wouldn't reset the GPS state and max measurements.
Signed-off-by: Keith Packard <keithp@keithp.com>
public void init (AltosRecord cur, AltosState prev_state) {
data = cur;
public void init (AltosRecord cur, AltosState prev_state) {
data = cur;
+ /* Discard previous state if it was for a different board */
+ if (prev_state != null && prev_state.data.serial != data.serial)
+ prev_state = null;
ground_altitude = data.ground_altitude();
altitude = data.altitude();
ground_altitude = data.ground_altitude();
altitude = data.altitude();