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/AltosEepromDownload.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'altoslib/AltosEepromDownload.java') diff --git a/altoslib/AltosEepromDownload.java b/altoslib/AltosEepromDownload.java index a448ee64..78a1f4be 100644 --- a/altoslib/AltosEepromDownload.java +++ b/altoslib/AltosEepromDownload.java @@ -254,7 +254,10 @@ public class AltosEepromDownload implements Runnable { flights = given_flights; success = false; - monitor.set_states(AltosLib.ao_flight_boost, AltosLib.ao_flight_landed); + if (flights.config_data.log_has_state()) + monitor.set_states(AltosLib.ao_flight_boost, AltosLib.ao_flight_landed); + else + monitor.set_states(AltosLib.ao_flight_invalid, AltosLib.ao_flight_invalid); monitor.start(); } -- cgit v1.2.3