altosui: Add ability to create CSV file from telem or eeprom files
[fw/altos] / ao-tools / altosui / AltosUI.java
index 8a4c753fefd6a04f021edd5f9014ee40b36866d7..63cb486c1b075b9041a8e240e1a012874436935a 100644 (file)
@@ -43,6 +43,7 @@ import altosui.AltosFlightInfoTableModel;
 import altosui.AltosChannelMenu;
 import altosui.AltosFlashUI;
 import altosui.AltosLogfileChooser;
+import altosui.AltosCSVUI;
 
 import libaltosJNI.*;
 
@@ -545,6 +546,14 @@ public class AltosUI extends JFrame {
                new AltosEepromDownload(AltosUI.this);
        }
 
+       /* Load a flight log file and write out a CSV file containing
+        * all of the data in standard units
+        */
+
+       private void ExportData() {
+               new AltosCSVUI(AltosUI.this);
+       }
+
        /* Create the AltosUI menus
         */
        private void createMenu() {
@@ -583,6 +592,14 @@ public class AltosUI extends JFrame {
                                });
                        menu.add(item);
 
+                       item = new JMenuItem("Export Data",KeyEvent.VK_F);
+                       item.addActionListener(new ActionListener() {
+                                       public void actionPerformed(ActionEvent e) {
+                                               ExportData();
+                                       }
+                               });
+                       menu.add(item);
+
                        item = new JMenuItem("Quit",KeyEvent.VK_Q);
                        item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,
                                                                   ActionEvent.CTRL_MASK));