X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=altosui%2FAltosEepromDownload.java;h=8fbd661ba1f563992b40350146b809830a7daa20;hb=ed200884f3e4fb895ee17ef38a9b6d3371b59625;hp=d72943099944a6c524f964da8ad7f8f73f1ae49d;hpb=382c54a0d052c8975b57c995ef83bc8934bde242;p=fw%2Faltos diff --git a/altosui/AltosEepromDownload.java b/altosui/AltosEepromDownload.java index d7294309..8fbd661b 100644 --- a/altosui/AltosEepromDownload.java +++ b/altosui/AltosEepromDownload.java @@ -23,7 +23,7 @@ import java.io.*; import java.util.*; import java.text.*; import java.util.concurrent.*; -import org.altusmetrum.AltosLib.*; +import org.altusmetrum.altoslib_1.*; public class AltosEepromDownload implements Runnable { @@ -107,7 +107,7 @@ public class AltosEepromDownload implements Runnable { extension = "eeprom"; set_serial(flights.config_data.serial); - for (int i = 0; i < eechunk.chunk_size && !done; i += AltosEepromRecord.record_length) { + for (int i = 0; i < AltosEepromChunk.chunk_size && !done; i += AltosEepromRecord.record_length) { try { AltosEepromRecord r = new AltosEepromRecord(eechunk, i); if (r.cmd == Altos.AO_LOG_FLIGHT) @@ -214,7 +214,7 @@ public class AltosEepromDownload implements Runnable { boolean any_valid = false; extension = "science"; - for (int i = 0; i < eechunk.chunk_size && !done; i += AltosEepromTeleScience.record_length) { + for (int i = 0; i < AltosEepromChunk.chunk_size && !done; i += AltosEepromTeleScience.record_length) { try { AltosEepromTeleScience r = new AltosEepromTeleScience(eechunk, i); if (r.type == AltosEepromTeleScience.AO_LOG_TELESCIENCE_START) { @@ -267,7 +267,7 @@ public class AltosEepromDownload implements Runnable { extension = "mega"; set_serial(flights.config_data.serial); - for (int i = 0; i < eechunk.chunk_size && !done; i += AltosEepromMega.record_length) { + for (int i = 0; i < AltosEepromChunk.chunk_size && !done; i += AltosEepromMega.record_length) { try { AltosEepromMega r = new AltosEepromMega(eechunk, i); if (r.cmd == Altos.AO_LOG_FLIGHT) @@ -283,7 +283,7 @@ public class AltosEepromDownload implements Runnable { if (r.cmd == Altos.AO_LOG_GPS_TIME) { year = 2000 + r.data8(14); month = r.data8(15); - day = r.data8(14); + day = r.data8(16); want_file = true; } @@ -314,7 +314,7 @@ public class AltosEepromDownload implements Runnable { done = false; start = true; - if (flights.config_data.serial == 0) + if (flights.config_data.serial < 0) throw new IOException("no serial number found"); /* Reset per-capture variables */