From 7f5b5848ad6ef5c808638a29c3dc0101b56ed11e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 24 Mar 2011 08:08:43 +0900 Subject: 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 --- altosui/AltosTelemetry.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'altosui/AltosTelemetry.java') 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); -- cgit v1.2.3