From: Keith Packard Date: Sun, 15 May 2016 20:58:41 +0000 (-0700) Subject: telegps: Use log_space when flight_log_max is missing X-Git-Tag: 1.6.4~1^2~34 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=df276262900551a5eecd94903eefe9a264b161ec telegps: Use log_space when flight_log_max is missing TeleGPS has this, but not flight_log_max Signed-off-by: Keith Packard --- diff --git a/telegps/TeleGPSState.java b/telegps/TeleGPSState.java index a0ff5727..e01ef47e 100644 --- a/telegps/TeleGPSState.java +++ b/telegps/TeleGPSState.java @@ -136,10 +136,13 @@ public class TeleGPSState extends AltosUIFlightTab { class FlightLogMax extends AltosUIIndicator { public void show(AltosState state, AltosListenerState listener_state) { - if (state.flight_log_max == AltosLib.MISSING) + int storage = state.flight_log_max; + if (storage == AltosLib.MISSING) + storage = state.log_space >> 10; + if (storage == AltosLib.MISSING) show("Missing"); else - show(String.format("%dkB", state.flight_log_max)); + show(String.format("%dkB", storage)); } public FlightLogMax(Container container, int y) {