X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosEepromFile.java;h=957c826a019098ec17bdce98be1ffb5b6cd1d052;hp=a1579b550d86a0e0ce3c925cff7815d3505d7eaa;hb=1085ec5d57e0ed5d132f2bbdac1a0b6a32c0ab4a;hpb=bd440afc2a6e37b74fffcf1b977e149485095316 diff --git a/altoslib/AltosEepromFile.java b/altoslib/AltosEepromFile.java index a1579b55..957c826a 100644 --- a/altoslib/AltosEepromFile.java +++ b/altoslib/AltosEepromFile.java @@ -3,7 +3,8 @@ * * 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; version 2 of the License. + * 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 @@ -15,7 +16,7 @@ * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -package org.altusmetrum.altoslib_5; +package org.altusmetrum.altoslib_11; import java.io.*; import java.util.*; @@ -72,7 +73,7 @@ public class AltosEepromFile extends AltosStateIterable { headers = new AltosEepromIterable(AltosEepromHeader.read(input)); start = headers.state(); - if (start.state != AltosLib.ao_flight_stateless) + if (start.state() != AltosLib.ao_flight_stateless) start.set_state(AltosLib.ao_flight_pad); if (start.log_format == AltosLib.MISSING) { @@ -89,12 +90,13 @@ public class AltosEepromFile extends AltosStateIterable { body = new AltosEepromIterable(AltosEepromTM.read(input)); break; case AltosLib.AO_LOG_FORMAT_TINY: - body = new AltosEepromIterable(AltosEepromTm.read(input)); + body = new AltosEepromIterable(AltosEepromTMini.read(input)); break; case AltosLib.AO_LOG_FORMAT_TELEMETRY: case AltosLib.AO_LOG_FORMAT_TELESCIENCE: case AltosLib.AO_LOG_FORMAT_TELEMEGA: - body = new AltosEepromIterable(AltosEepromMega.read(input)); + case AltosLib.AO_LOG_FORMAT_TELEMEGA_OLD: + body = new AltosEepromIterable(AltosEepromMega.read(input, start.log_format)); break; case AltosLib.AO_LOG_FORMAT_TELEMETRUM: body = new AltosEepromIterable(AltosEepromMetrum2.read(input)); @@ -116,7 +118,7 @@ public class AltosEepromFile extends AltosStateIterable { for (AltosEeprom eeprom : body) { eeprom.update_state(state); state.finish_update(); - if (state.state >= AltosLib.ao_flight_boost) { + if (state.state() >= AltosLib.ao_flight_boost) { start.set_boost_tick(state.tick); break; }