summaryrefslogtreecommitdiff
path: root/altosuilib
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-05-09 02:31:04 -0700
committerKeith Packard <keithp@keithp.com>2017-05-09 02:31:04 -0700
commit0641326842bffbf4b3ae69459ca540131cb64e59 (patch)
tree31231c75d916a978de51c4f303af516e147de115 /altosuilib
parent17e20a6d2dab1f4bd1375bfd9e1c5230ee2c1119 (diff)
altoslib: Remove older eeprom handling code
The new code appears to work in minor testing; time to try it all the time. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosuilib')
-rw-r--r--altosuilib/AltosDataChooser.java7
-rw-r--r--altosuilib/AltosEepromSelect.java6
2 files changed, 7 insertions, 6 deletions
diff --git a/altosuilib/AltosDataChooser.java b/altosuilib/AltosDataChooser.java
index 8758fc34..a8c74926 100644
--- a/altosuilib/AltosDataChooser.java
+++ b/altosuilib/AltosDataChooser.java
@@ -47,7 +47,7 @@ public class AltosDataChooser extends JFileChooser {
filename = file.getName();
try {
if (filename.endsWith("eeprom")) {
- FileInputStream in = new FileInputStream(file);
+ FileReader in = new FileReader(file);
return new AltosEepromFile(in);
} else if (filename.endsWith("telem")) {
FileInputStream in = new FileInputStream(file);
@@ -60,6 +60,11 @@ public class AltosDataChooser extends JFileChooser {
fe.getMessage(),
"Cannot open file",
JOptionPane.ERROR_MESSAGE);
+ } catch (IOException ie) {
+ JOptionPane.showMessageDialog(frame,
+ ie.getMessage(),
+ "Error reading file",
+ JOptionPane.ERROR_MESSAGE);
}
}
return null;
diff --git a/altosuilib/AltosEepromSelect.java b/altosuilib/AltosEepromSelect.java
index 0b4b7a85..2c6ee6d7 100644
--- a/altosuilib/AltosEepromSelect.java
+++ b/altosuilib/AltosEepromSelect.java
@@ -38,11 +38,7 @@ class AltosEepromItem implements ActionListener {
log = in_log;
String text;
- if (log.year != 0)
- text = String.format("Flight #%02d - %04d-%02d-%02d",
- log.flight, log.year, log.month, log.day);
- else
- text = String.format("Flight #%02d", log.flight);
+ text = String.format("Flight #%02d", log.flight);
label = new JLabel(text);