summaryrefslogtreecommitdiff
path: root/telegps/TeleGPSState.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2016-05-15 13:58:41 -0700
committerKeith Packard <keithp@keithp.com>2016-05-15 13:58:41 -0700
commitdf276262900551a5eecd94903eefe9a264b161ec (patch)
tree08b2b9ebbf804d488729d8f6c00e06489a83c90e /telegps/TeleGPSState.java
parent9287122edc0e2dec6b2542f4cc8cb9cf2900bb33 (diff)
telegps: Use log_space when flight_log_max is missing
TeleGPS has this, but not flight_log_max Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'telegps/TeleGPSState.java')
-rw-r--r--telegps/TeleGPSState.java7
1 files changed, 5 insertions, 2 deletions
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) {