X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=altoslib%2FAltosEepromChunk.java;h=1c1e80c7d20714ac821af6c35841174edaf2a999;hp=1709352b3a640be5c0c3f523b8333066b9150cb9;hb=fab890328d4e1151932621a317226bc291b853da;hpb=77dc89ed5b7bf8f5b3fa3b6131660f1a98f583ea diff --git a/altoslib/AltosEepromChunk.java b/altoslib/AltosEepromChunk.java index 1709352b..1c1e80c7 100644 --- a/altoslib/AltosEepromChunk.java +++ b/altoslib/AltosEepromChunk.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_1; +package org.altusmetrum.altoslib_13; import java.text.*; import java.util.concurrent.*; @@ -62,30 +63,8 @@ public class AltosEepromChunk { return true; } - public AltosEeprom eeprom(int offset, int log_format) { - AltosEeprom eeprom = null; - try { - switch (log_format) { - case AltosLib.AO_LOG_FORMAT_FULL: - eeprom = new AltosEepromTM(this, offset); - break; - case AltosLib.AO_LOG_FORMAT_TINY: - case AltosLib.AO_LOG_FORMAT_TELEMETRY: - case AltosLib.AO_LOG_FORMAT_TELESCIENCE: - case AltosLib.AO_LOG_FORMAT_TELEMEGA: - eeprom = new AltosEepromMega(this, offset); - break; - case AltosLib.AO_LOG_FORMAT_TELEMETRUM: - eeprom = new AltosEepromMetrum2(this, offset); - break; - case AltosLib.AO_LOG_FORMAT_TELEMINI: - case AltosLib.AO_LOG_FORMAT_EASYMINI: - eeprom = new AltosEepromMini(this, offset); - break; - } - } catch (ParseException e) { - } - return eeprom; + public boolean erased() { + return erased(0, chunk_size); } public AltosEepromChunk(AltosLink link, int block, boolean flush) @@ -123,4 +102,4 @@ public class AltosEepromChunk { } } } -} \ No newline at end of file +}