From 35ad1833b10595564de84c88f44a214b1c134ccf Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Fri, 6 Feb 2015 20:36:44 -0800 Subject: altosuilib: EEProm download from TeleGPS doesn't have states As TeleGPS doesn't have flight states, the EEProm download progress bar shouldn't show 'state invalid', and it should use a different scale for each block. Fix this by having AltosConfigData know which devices have state based on their log format, then mark the progress bar state limits as 'invalid/invalid' instead of 'boost/landed'. Then have the progress bar use that to set a more reasonable scale for each block. Signed-off-by: Keith Packard --- altoslib/AltosConfigData.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'altoslib/AltosConfigData.java') diff --git a/altoslib/AltosConfigData.java b/altoslib/AltosConfigData.java index 65f6346a..0820bf56 100644 --- a/altoslib/AltosConfigData.java +++ b/altoslib/AltosConfigData.java @@ -577,6 +577,14 @@ public class AltosConfigData implements Iterable { dest.set_tracker_interval(tracker_interval); } + public boolean log_has_state() { + switch (log_format) { + case AltosLib.AO_LOG_FORMAT_TELEGPS: + return false; + } + return true; + } + public void save(AltosLink link, boolean remote) throws InterruptedException, TimeoutException { /* HAS_FLIGHT */ -- cgit v1.2.3