diff options
| author | Keith Packard <keithp@keithp.com> | 2017-11-11 20:49:20 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-11-11 20:49:20 -0800 | 
| commit | 9a7b4f02ad32ca43a45ed9fe446b8db96e60b5e5 (patch) | |
| tree | af009a016229cb6e377bc5d4cecd92874c89a839 /telegps/TeleGPS.java | |
| parent | 10834eb60f7a44fee159d9e9ad5ffb2e013fe9cf (diff) | |
altoslib: Improve EEprom download
* Catch and report CRC errors
* Deal with corrupted flight records
* Add ability to immediately graph new data
* Check before overwriting existing files
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'telegps/TeleGPS.java')
| -rw-r--r-- | telegps/TeleGPS.java | 19 | 
1 files changed, 17 insertions, 2 deletions
| diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java index 3646f000..1433c9e1 100644 --- a/telegps/TeleGPS.java +++ b/telegps/TeleGPS.java @@ -30,7 +30,7 @@ import org.altusmetrum.altosuilib_12.*;  public class TeleGPS  	extends AltosUIFrame -	implements AltosFlightDisplay, AltosFontListener, AltosUnitsListener, ActionListener +	implements AltosFlightDisplay, AltosFontListener, AltosUnitsListener, ActionListener, AltosEepromGrapher  {  	static String[] telegps_icon_names = { @@ -280,7 +280,7 @@ public class TeleGPS  	}  	void download(){ -		new AltosEepromManage(this, AltosLib.product_telegps); +		new AltosEepromManage(this, this, AltosLib.product_telegps);  	}  	void configure() { @@ -316,6 +316,21 @@ public class TeleGPS  		}  	} +	public void graph_flights(AltosEepromList list) { +		for (AltosEepromLog log : list) { +			if (log.file != null) { +				AltosRecordSet set = record_set(log.file); +				if (set != null) { +					try { +						new TeleGPSGraphUI(set, log.file); +					} catch (InterruptedException ie) { +					} catch (IOException ie) { +					} +				} +			} +		} +	} +  	void flash() {  		AltosFlashUI.show(this);  	} | 
