diff options
author | Keith Packard <keithp@keithp.com> | 2011-03-24 08:08:43 +0900 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-03-24 08:08:43 +0900 |
commit | 7f5b5848ad6ef5c808638a29c3dc0101b56ed11e (patch) | |
tree | c85d6936a17ee4533cc8b41e29e59acd1e93d47c /altosui/AltosTelemetry.java | |
parent | f3e68341f6f5daaf26dd162e4f9a06c29988986a (diff) |
altosui: Add telemetry format menu and preferences
Switches the TeleDongle between full and tiny telemetry packet
formats, saving the last used format for each teledongle in the
application preferences.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosTelemetry.java')
-rw-r--r-- | altosui/AltosTelemetry.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/altosui/AltosTelemetry.java b/altosui/AltosTelemetry.java index 3eb0efa8..91b6d048 100644 --- a/altosui/AltosTelemetry.java +++ b/altosui/AltosTelemetry.java @@ -253,12 +253,8 @@ public class AltosTelemetry extends AltosRecord { accel_minus_g = map.get_int(AO_TELEM_CAL_ACCEL_MINUS, MISSING); /* flight computer values */ - acceleration = map.get_int(AO_TELEM_KALMAN_ACCEL, MISSING); - if (acceleration != MISSING) - acceleration /= 16.0; - speed = map.get_int(AO_TELEM_KALMAN_SPEED, MISSING); - if (speed != MISSING) - speed /= 16.0; + acceleration = map.get_double(AO_TELEM_KALMAN_ACCEL, MISSING, 1/16.0); + speed = map.get_double(AO_TELEM_KALMAN_SPEED, MISSING, 1/16.0); height = map.get_int(AO_TELEM_KALMAN_HEIGHT, MISSING); flight_accel = map.get_int(AO_TELEM_ADHOC_ACCEL, MISSING); |