altoslib: Improve EEprom download
[fw/altos] / telegps / TeleGPS.java
index 3646f000a450d2b65a8c1304520a7a84098f248c..1433c9e164c01bade972e009d7a7b42f6c13d0e8 100644 (file)
@@ -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);
        }