diff options
| author | Keith Packard <keithp@keithp.com> | 2015-02-06 20:36:44 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2015-02-06 20:36:44 -0800 | 
| commit | 35ad1833b10595564de84c88f44a214b1c134ccf (patch) | |
| tree | 7a98c4e39f624ed589a66d493deda09dfe29190a /altoslib/AltosEepromDownload.java | |
| parent | 66e7a8081c07d0d96a31ae34963d430f06dccdfb (diff) | |
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 <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosEepromDownload.java')
| -rw-r--r-- | altoslib/AltosEepromDownload.java | 5 | 
1 files changed, 4 insertions, 1 deletions
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();  	}  | 
