altoslib: Rename AltosEepromNew to AltosEeprom
authorKeith Packard <keithp@keithp.com>
Tue, 13 Jun 2017 17:46:03 +0000 (10:46 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 13 Jun 2017 17:46:03 +0000 (10:46 -0700)
Signed-off-by: Keith Packard <keithp@keithp.com>
13 files changed:
altoslib/AltosEeprom.java [new file with mode: 0644]
altoslib/AltosEepromDownload.java
altoslib/AltosEepromNew.java [deleted file]
altoslib/AltosEepromRecord.java
altoslib/AltosEepromRecordFireTwo.java
altoslib/AltosEepromRecordFull.java
altoslib/AltosEepromRecordGps.java
altoslib/AltosEepromRecordMega.java
altoslib/AltosEepromRecordMetrum.java
altoslib/AltosEepromRecordMini.java
altoslib/AltosEepromRecordSet.java
altoslib/AltosEepromRecordTiny.java
altoslib/Makefile.am

diff --git a/altoslib/AltosEeprom.java b/altoslib/AltosEeprom.java
new file mode 100644 (file)
index 0000000..2600e80
--- /dev/null
@@ -0,0 +1,291 @@
+/*
+ * Copyright © 2017 Keith Packard <keithp@keithp.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+package org.altusmetrum.altoslib_11;
+
+import java.util.*;
+import java.io.*;
+
+public class AltosEeprom {
+
+       private AltosJson       config;
+       ArrayList<Byte>         data;
+       private AltosConfigData config_data;
+
+       /*
+        * Public accessor APIs
+        */
+       public int data8(int offset) {
+               return ((int) data.get(offset)) & 0xff;
+       }
+
+       public int data16(int offset) {
+               return data8(offset) | (data8(offset+1) << 8);
+       }
+
+       public int data24(int offset) {
+               return (data8(offset) |
+                       (data8(offset+1) << 8) |
+                       (data8(offset+2) << 16));
+       }
+
+       public int data32(int offset) {
+               return (data8(offset) |
+                       (data8(offset+1) << 8) |
+                       (data8(offset+2) << 16) |
+                       (data8(offset+3) << 24));
+       }
+
+       public int size() {
+               return data.size();
+       }
+
+       public AltosConfigData config_data() {
+               if (config_data == null) {
+                       config_data = (AltosConfigData) config.make(AltosConfigData.class);
+                       if (config_data == null)
+                               config_data = new AltosConfigData();
+
+                       if (config_data.log_format == AltosLib.AO_LOG_FORMAT_UNKNOWN) {
+                               config_data.log_format = AltosLib.AO_LOG_FORMAT_FULL;
+                               if (config_data.product != null) {
+                                       if (config_data.product.startsWith("TeleMetrum"))
+                                               config_data.log_format = AltosLib.AO_LOG_FORMAT_FULL;
+                                       else if (config_data.product.startsWith("TeleMini"))
+                                               config_data.log_format = AltosLib.AO_LOG_FORMAT_TINY;
+                               }
+                       }
+               }
+               return config_data;
+       }
+
+       private void write_config(Writer w) throws IOException {
+               config.write(w, 0, true);
+               w.append('\n');
+       }
+
+       /*
+        * Private I/O APIs
+        */
+       private void write_data(Writer w) throws IOException {
+               PrintWriter pw = new PrintWriter(w);
+
+               for (int i = 0; i < data.size(); i++) {
+                       if (i > 0) {
+                               if ((i & 0x1f) == 0)
+                                       pw.printf("\n");
+                               else
+                                       pw.printf(" ");
+                       }
+                       pw.printf("%02x", data.get(i));
+               }
+               w.append('\n');
+       }
+
+       private boolean read_config(InputStream stream) throws IOException {
+               config = AltosJson.fromInputStream(stream);
+               if (config == null)
+                       return false;
+               return true;
+       }
+
+       private String read_line(InputStream stream) throws IOException {
+               StringBuffer    buffer = null;
+               int             c;
+
+               for (;;) {
+                       c = stream.read();
+                       if (c == -1 && buffer == null)
+                               return null;
+                       if (buffer == null)
+                               buffer = new StringBuffer();
+                       if (c == -1 || c == '\n')
+                               return buffer.toString();
+                       buffer.append((char) c);
+               }
+       }
+
+       private boolean read_data(InputStream stream) throws IOException {
+               String                  s;
+
+               data = new ArrayList<Byte>();
+               while ((s = read_line(stream)) != null) {
+
+                       String[] tokens = s.split("\\s+");
+
+                       for (int i = 0; i < tokens.length; i++) {
+                               if (tokens[i].length() > 0) {
+                                       try {
+                                               data.add((byte) AltosLib.fromhex(tokens[i]));
+                                       } catch (NumberFormatException e) {
+                                               throw new IOException(e.toString());
+                                       }
+                               }
+                       }
+               }
+               return true;
+       }
+
+       private boolean read_old_config(InputStream stream) throws IOException {
+               AltosConfigData cfg = new AltosConfigData();
+               for (;;) {
+                       boolean done = false;
+
+                       /* The data starts with an upper case F character followed by a space */
+                       stream.mark(2);
+                       int     first = stream.read();
+                       if (first == 'F') {
+                               int second =  stream.read();
+                               if (second == ' ')
+                                       done = true;
+                       }
+                       stream.reset();
+                       if (done)
+                               break;
+
+                       String line = read_line(stream);
+                       if (line == null)
+                               return false;
+                       cfg.parse_line(line);
+               }
+               config = new AltosJson(cfg);
+               return true;
+       }
+
+       private boolean read_old_data(InputStream stream) throws IOException {
+               String line;
+
+               data = new ArrayList<Byte>();
+               while ((line = read_line(stream)) != null) {
+                       String[] tokens = line.split("\\s+");
+
+                       /* Make sure there's at least a type and time */
+                       if (tokens.length < 2)
+                               break;
+
+                       /* packet type */
+                       if (tokens[0].length() != 1)
+                               break;
+                       int start = data.size();
+
+                       if (config_data().log_format != AltosLib.AO_LOG_FORMAT_TINY) {
+                               byte cmd = (byte) tokens[0].codePointAt(0);
+                               data.add(cmd);
+
+                               int time = AltosLib.fromhex(tokens[1]);
+
+                               data.add((byte) 0);
+                               data.add((byte) (time & 0xff));
+                               data.add((byte) (time >> 8));
+                       }
+                       if (tokens.length == 4) {
+                               /* Handle ancient log files */
+                               if (config_data().log_format == AltosLib.AO_LOG_FORMAT_TINY) {
+                                       /*
+                                        * Ancient TeleMini log files stored "extra" data to pretend
+                                        * that it was a TeleMetrum device. Throw that away and
+                                        * just save the actual log data.
+                                        */
+                                       int a = AltosLib.fromhex(tokens[2]);
+                                       int b = AltosLib.fromhex(tokens[3]);
+                                       if (a != 0)
+                                               b = 0x8000 | a;
+                                       data.add((byte) (b & 0xff));
+                                       data.add((byte) ((b >> 8)));
+                               } else {
+                                       for (int i = 2; i < tokens.length; i++) {
+                                               int v = AltosLib.fromhex(tokens[i]);
+                                               data.add((byte) (v & 0xff));
+                                               data.add((byte) ((v >> 8)));
+                                       }
+                                       /* Re-compute the checksum byte */
+                                       data.set(start + 1, (byte) (256 - AltosConvert.checksum(data, start, data.size() - start)));
+                               }
+                       } else {
+                               for (int i = 2; i < tokens.length; i++)
+                                       data.add((byte) AltosLib.fromhex(tokens[i]));
+                               /* Re-compute the checksum byte */
+                               data.set(start + 1, (byte) (256 - AltosConvert.checksum(data, start, data.size() - start)));
+                       }
+               }
+               return true;
+       }
+
+       private void read(InputStream stream) throws IOException {
+               BufferedInputStream     bis = new BufferedInputStream(stream);
+
+               bis.mark(1);
+               int c = bis.read();
+               bis.reset();
+
+               if (c == '{') {
+                       if (!read_config(bis))
+                               throw new IOException("failed to read config");
+                       if (!read_data(bis))
+                               throw new IOException("failed to read data");
+               } else {
+                       if (!read_old_config(bis))
+                               throw new IOException("failed to read old config");
+                       if (!read_old_data(bis))
+                               throw new IOException("failed to read old data");
+               }
+       }
+
+       /*
+        * Public APIs for I/O
+        */
+       public void write(Writer w) throws IOException {
+               write_config(w);
+               write_data(w);
+       }
+
+       public String toString() {
+               try {
+                       Writer  w = new StringWriter();
+
+                       write(w);
+                       return w.toString();
+               } catch (Exception e) {
+                       return null;
+               }
+       }
+
+       public void print() throws IOException {
+               System.out.printf("%s", toString());
+       }
+
+       /*
+        * Constructors
+        */
+       public AltosEeprom(InputStream stream) throws IOException {
+               read(stream);
+       }
+
+       public AltosEeprom(String s) throws IOException {
+               read(new AltosStringInputStream(s));
+       }
+
+       public AltosEeprom(AltosJson config, ArrayList<Byte> data) {
+               this.config = config;
+               this.data = data;
+       }
+
+       public AltosEeprom(AltosConfigData config_data, ArrayList<Byte> data) {
+               this.config = new AltosJson(config_data);
+               this.data = data;
+       }
+
+       public AltosEeprom() {
+       }
+}
index 8a2053ecd4a8ae809a293354dd220e8cec1ca778..961b32cd6c9bdf12fbfde1e96f890e2816645047 100644 (file)
@@ -181,7 +181,7 @@ public class AltosEepromDownload implements Runnable {
                }
 
                /* Construct our internal representation of the eeprom data */
-               AltosEepromNew  eeprom = new AltosEepromNew(flights.config_data, data);
+               AltosEeprom     eeprom = new AltosEeprom(flights.config_data, data);
 
                /* Now see if we can't actually parse the resulting
                 * file to generate a better filename. Note that this
diff --git a/altoslib/AltosEepromNew.java b/altoslib/AltosEepromNew.java
deleted file mode 100644 (file)
index c373bff..0000000
+++ /dev/null
@@ -1,291 +0,0 @@
-/*
- * Copyright © 2017 Keith Packard <keithp@keithp.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- */
-
-package org.altusmetrum.altoslib_11;
-
-import java.util.*;
-import java.io.*;
-
-public class AltosEepromNew {
-
-       private AltosJson       config;
-       ArrayList<Byte>         data;
-       private AltosConfigData config_data;
-
-       /*
-        * Public accessor APIs
-        */
-       public int data8(int offset) {
-               return ((int) data.get(offset)) & 0xff;
-       }
-
-       public int data16(int offset) {
-               return data8(offset) | (data8(offset+1) << 8);
-       }
-
-       public int data24(int offset) {
-               return (data8(offset) |
-                       (data8(offset+1) << 8) |
-                       (data8(offset+2) << 16));
-       }
-
-       public int data32(int offset) {
-               return (data8(offset) |
-                       (data8(offset+1) << 8) |
-                       (data8(offset+2) << 16) |
-                       (data8(offset+3) << 24));
-       }
-
-       public int size() {
-               return data.size();
-       }
-
-       public AltosConfigData config_data() {
-               if (config_data == null) {
-                       config_data = (AltosConfigData) config.make(AltosConfigData.class);
-                       if (config_data == null)
-                               config_data = new AltosConfigData();
-
-                       if (config_data.log_format == AltosLib.AO_LOG_FORMAT_UNKNOWN) {
-                               config_data.log_format = AltosLib.AO_LOG_FORMAT_FULL;
-                               if (config_data.product != null) {
-                                       if (config_data.product.startsWith("TeleMetrum"))
-                                               config_data.log_format = AltosLib.AO_LOG_FORMAT_FULL;
-                                       else if (config_data.product.startsWith("TeleMini"))
-                                               config_data.log_format = AltosLib.AO_LOG_FORMAT_TINY;
-                               }
-                       }
-               }
-               return config_data;
-       }
-
-       private void write_config(Writer w) throws IOException {
-               config.write(w, 0, true);
-               w.append('\n');
-       }
-
-       /*
-        * Private I/O APIs
-        */
-       private void write_data(Writer w) throws IOException {
-               PrintWriter pw = new PrintWriter(w);
-
-               for (int i = 0; i < data.size(); i++) {
-                       if (i > 0) {
-                               if ((i & 0x1f) == 0)
-                                       pw.printf("\n");
-                               else
-                                       pw.printf(" ");
-                       }
-                       pw.printf("%02x", data.get(i));
-               }
-               w.append('\n');
-       }
-
-       private boolean read_config(InputStream stream) throws IOException {
-               config = AltosJson.fromInputStream(stream);
-               if (config == null)
-                       return false;
-               return true;
-       }
-
-       private String read_line(InputStream stream) throws IOException {
-               StringBuffer    buffer = null;
-               int             c;
-
-               for (;;) {
-                       c = stream.read();
-                       if (c == -1 && buffer == null)
-                               return null;
-                       if (buffer == null)
-                               buffer = new StringBuffer();
-                       if (c == -1 || c == '\n')
-                               return buffer.toString();
-                       buffer.append((char) c);
-               }
-       }
-
-       private boolean read_data(InputStream stream) throws IOException {
-               String                  s;
-
-               data = new ArrayList<Byte>();
-               while ((s = read_line(stream)) != null) {
-
-                       String[] tokens = s.split("\\s+");
-
-                       for (int i = 0; i < tokens.length; i++) {
-                               if (tokens[i].length() > 0) {
-                                       try {
-                                               data.add((byte) AltosLib.fromhex(tokens[i]));
-                                       } catch (NumberFormatException e) {
-                                               throw new IOException(e.toString());
-                                       }
-                               }
-                       }
-               }
-               return true;
-       }
-
-       private boolean read_old_config(InputStream stream) throws IOException {
-               AltosConfigData cfg = new AltosConfigData();
-               for (;;) {
-                       boolean done = false;
-
-                       /* The data starts with an upper case F character followed by a space */
-                       stream.mark(2);
-                       int     first = stream.read();
-                       if (first == 'F') {
-                               int second =  stream.read();
-                               if (second == ' ')
-                                       done = true;
-                       }
-                       stream.reset();
-                       if (done)
-                               break;
-
-                       String line = read_line(stream);
-                       if (line == null)
-                               return false;
-                       cfg.parse_line(line);
-               }
-               config = new AltosJson(cfg);
-               return true;
-       }
-
-       private boolean read_old_data(InputStream stream) throws IOException {
-               String line;
-
-               data = new ArrayList<Byte>();
-               while ((line = read_line(stream)) != null) {
-                       String[] tokens = line.split("\\s+");
-
-                       /* Make sure there's at least a type and time */
-                       if (tokens.length < 2)
-                               break;
-
-                       /* packet type */
-                       if (tokens[0].length() != 1)
-                               break;
-                       int start = data.size();
-
-                       if (config_data().log_format != AltosLib.AO_LOG_FORMAT_TINY) {
-                               byte cmd = (byte) tokens[0].codePointAt(0);
-                               data.add(cmd);
-
-                               int time = AltosLib.fromhex(tokens[1]);
-
-                               data.add((byte) 0);
-                               data.add((byte) (time & 0xff));
-                               data.add((byte) (time >> 8));
-                       }
-                       if (tokens.length == 4) {
-                               /* Handle ancient log files */
-                               if (config_data().log_format == AltosLib.AO_LOG_FORMAT_TINY) {
-                                       /*
-                                        * Ancient TeleMini log files stored "extra" data to pretend
-                                        * that it was a TeleMetrum device. Throw that away and
-                                        * just save the actual log data.
-                                        */
-                                       int a = AltosLib.fromhex(tokens[2]);
-                                       int b = AltosLib.fromhex(tokens[3]);
-                                       if (a != 0)
-                                               b = 0x8000 | a;
-                                       data.add((byte) (b & 0xff));
-                                       data.add((byte) ((b >> 8)));
-                               } else {
-                                       for (int i = 2; i < tokens.length; i++) {
-                                               int v = AltosLib.fromhex(tokens[i]);
-                                               data.add((byte) (v & 0xff));
-                                               data.add((byte) ((v >> 8)));
-                                       }
-                                       /* Re-compute the checksum byte */
-                                       data.set(start + 1, (byte) (256 - AltosConvert.checksum(data, start, data.size() - start)));
-                               }
-                       } else {
-                               for (int i = 2; i < tokens.length; i++)
-                                       data.add((byte) AltosLib.fromhex(tokens[i]));
-                               /* Re-compute the checksum byte */
-                               data.set(start + 1, (byte) (256 - AltosConvert.checksum(data, start, data.size() - start)));
-                       }
-               }
-               return true;
-       }
-
-       private void read(InputStream stream) throws IOException {
-               BufferedInputStream     bis = new BufferedInputStream(stream);
-
-               bis.mark(1);
-               int c = bis.read();
-               bis.reset();
-
-               if (c == '{') {
-                       if (!read_config(bis))
-                               throw new IOException("failed to read config");
-                       if (!read_data(bis))
-                               throw new IOException("failed to read data");
-               } else {
-                       if (!read_old_config(bis))
-                               throw new IOException("failed to read old config");
-                       if (!read_old_data(bis))
-                               throw new IOException("failed to read old data");
-               }
-       }
-
-       /*
-        * Public APIs for I/O
-        */
-       public void write(Writer w) throws IOException {
-               write_config(w);
-               write_data(w);
-       }
-
-       public String toString() {
-               try {
-                       Writer  w = new StringWriter();
-
-                       write(w);
-                       return w.toString();
-               } catch (Exception e) {
-                       return null;
-               }
-       }
-
-       public void print() throws IOException {
-               System.out.printf("%s", toString());
-       }
-
-       /*
-        * Constructors
-        */
-       public AltosEepromNew(InputStream stream) throws IOException {
-               read(stream);
-       }
-
-       public AltosEepromNew(String s) throws IOException {
-               read(new AltosStringInputStream(s));
-       }
-
-       public AltosEepromNew(AltosJson config, ArrayList<Byte> data) {
-               this.config = config;
-               this.data = data;
-       }
-
-       public AltosEepromNew(AltosConfigData config_data, ArrayList<Byte> data) {
-               this.config = new AltosJson(config_data);
-               this.data = data;
-       }
-
-       public AltosEepromNew() {
-       }
-}
index 75fe5381f51b1c9e57de5b85cc846969b55927d5..c479a6215d49b70cd44fcb3df3d9f0ea67fea1b5 100644 (file)
@@ -16,7 +16,7 @@ package org.altusmetrum.altoslib_11;
 
 public abstract class AltosEepromRecord implements Comparable<AltosEepromRecord> {
 
-       AltosEepromNew          eeprom;
+       AltosEeprom             eeprom;
 
        int                     wide_tick;
 
@@ -115,7 +115,7 @@ public abstract class AltosEepromRecord implements Comparable<AltosEepromRecord>
 
        public abstract AltosEepromRecord next();
 
-       public AltosEepromRecord(AltosEepromNew eeprom, int start, int length) {
+       public AltosEepromRecord(AltosEeprom eeprom, int start, int length) {
                this.eeprom = eeprom;
                this.start = start;
                this.length = length;
index 713d0bb71fc182ba45ef9cf11b0cb32d8bfb17ce..48d480c523f8e366a6f99eceb79fd07ff0f67be0 100644 (file)
@@ -92,11 +92,11 @@ public class AltosEepromRecordFireTwo extends AltosEepromRecord {
                return new AltosEepromRecordFireTwo(eeprom, s);
        }
 
-       public AltosEepromRecordFireTwo(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordFireTwo(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
        }
 
-       public AltosEepromRecordFireTwo(AltosEepromNew eeprom) {
+       public AltosEepromRecordFireTwo(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index c29da0256b7b9d46bafc64523c9b7ae23643ccbe..10ae0bef43d38d9b99612ebc570f1f67c1333be2 100644 (file)
@@ -104,11 +104,11 @@ public class AltosEepromRecordFull extends AltosEepromRecord {
                return new AltosEepromRecordFull(eeprom, s);
        }
 
-       public AltosEepromRecordFull(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordFull(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
        }
 
-       public AltosEepromRecordFull(AltosEepromNew eeprom) {
+       public AltosEepromRecordFull(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index a992abff6cb242d2e5b5939ec82f15647028d8d1..ee76d0739747efebfb88b8996ef826769f1dde47 100644 (file)
@@ -135,11 +135,11 @@ public class AltosEepromRecordGps extends AltosEepromRecord {
                return new AltosEepromRecordGps(eeprom, s);
        }
 
-       public AltosEepromRecordGps(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordGps(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
        }
 
-       public AltosEepromRecordGps(AltosEepromNew eeprom) {
+       public AltosEepromRecordGps(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index d0da1b7ccf4b48f31f10b4ab9626c036fad08804..fdbbd6f7e6bdf69eec69669c740f2de795a35293 100644 (file)
@@ -249,12 +249,12 @@ public class AltosEepromRecordMega extends AltosEepromRecord {
                return new AltosEepromRecordMega(eeprom, s);
        }
 
-       public AltosEepromRecordMega(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordMega(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
                log_format = eeprom.config_data().log_format;
        }
 
-       public AltosEepromRecordMega(AltosEepromNew eeprom) {
+       public AltosEepromRecordMega(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index 248709b31223f4ec3a38ff023059f5927f6c58c6..65d8f0862687bb1d9bcba5b45ba99eabee78fb99 100644 (file)
@@ -135,11 +135,11 @@ public class AltosEepromRecordMetrum extends AltosEepromRecord {
                return new AltosEepromRecordMetrum(eeprom, s);
        }
 
-       public AltosEepromRecordMetrum(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordMetrum(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
        }
 
-       public AltosEepromRecordMetrum(AltosEepromNew eeprom) {
+       public AltosEepromRecordMetrum(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index 22bd073a59789d5ac280ba56274fc9df25904d15..787f4e0dd4ea4fbdff1b90e043b3543cd5a8af68 100644 (file)
@@ -95,11 +95,11 @@ public class AltosEepromRecordMini extends AltosEepromRecord {
                return new AltosEepromRecordMini(eeprom, s);
        }
 
-       public AltosEepromRecordMini(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordMini(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
        }
 
-       public AltosEepromRecordMini(AltosEepromNew eeprom) {
+       public AltosEepromRecordMini(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index 1f10e677ee29540d9731c55749d73778eaf26d8d..df1aad9f54dea63c4ee76c4a531d5a24725b1ac8 100644 (file)
@@ -18,7 +18,7 @@ import java.io.*;
 import java.util.*;
 
 public class AltosEepromRecordSet implements AltosRecordSet {
-       AltosEepromNew                  eeprom;
+       AltosEeprom                     eeprom;
        TreeSet<AltosEepromRecord>      ordered;
        AltosCalData                    cal_data;
 
@@ -50,7 +50,7 @@ public class AltosEepromRecordSet implements AltosRecordSet {
                listener.finish();
        }
 
-       public AltosEepromRecordSet(AltosEepromNew eeprom) {
+       public AltosEepromRecordSet(AltosEeprom eeprom) {
                this.eeprom = eeprom;
 
                AltosConfigData         config_data = eeprom.config_data();
@@ -115,6 +115,6 @@ public class AltosEepromRecordSet implements AltosRecordSet {
        }
 
        public AltosEepromRecordSet(InputStream input) throws IOException {
-               this(new AltosEepromNew(input));
+               this(new AltosEeprom(input));
        }
 }
index 70960a2ae4452ee3400da7f906b09836949f0f14..628e18c31dd8c106d88fe8eac9169bc615afbfe8 100644 (file)
@@ -77,11 +77,11 @@ public class AltosEepromRecordTiny extends AltosEepromRecord implements AltosDat
                return new AltosEepromRecordTiny(eeprom, s);
        }
 
-       public AltosEepromRecordTiny(AltosEepromNew eeprom, int start) {
+       public AltosEepromRecordTiny(AltosEeprom eeprom, int start) {
                super(eeprom, start, record_length);
        }
 
-       public AltosEepromRecordTiny(AltosEepromNew eeprom) {
+       public AltosEepromRecordTiny(AltosEeprom eeprom) {
                this(eeprom, 0);
        }
 }
index ce934b4f097fe1028c201399b6da67a27b469f85..11b5d562ee643ae1f7e061bc9a885702c6d22a86 100644 (file)
@@ -35,7 +35,7 @@ altoslib_JAVA = \
        AltosCRCException.java \
        AltosCSV.java \
        AltosDebug.java \
-       AltosEepromNew.java \
+       AltosEeprom.java \
        AltosRecordSet.java \
        AltosEepromRecord.java \
        AltosEepromRecordFull.java \