+ public AltosEeprom eeprom(int offset, int log_format, AltosState state) throws ParseException {
+ AltosEeprom eeprom = null;
+ switch (log_format) {
+ case AltosLib.AO_LOG_FORMAT_FULL:
+ eeprom = new AltosEepromTM(this, offset);
+ break;
+ case AltosLib.AO_LOG_FORMAT_TINY:
+ eeprom = new AltosEepromTMini(this, offset, state);
+ break;
+ case AltosLib.AO_LOG_FORMAT_TELEMETRY:
+ case AltosLib.AO_LOG_FORMAT_TELESCIENCE:
+ break;
+ case AltosLib.AO_LOG_FORMAT_TELEMEGA:
+ case AltosLib.AO_LOG_FORMAT_TELEMEGA_OLD:
+ eeprom = new AltosEepromMega(this, offset, log_format);
+ break;
+ case AltosLib.AO_LOG_FORMAT_TELEMETRUM:
+ eeprom = new AltosEepromMetrum2(this, offset);
+ break;
+ case AltosLib.AO_LOG_FORMAT_TELEMINI2:
+ case AltosLib.AO_LOG_FORMAT_TELEMINI3:
+ case AltosLib.AO_LOG_FORMAT_EASYMINI:
+ eeprom = new AltosEepromMini(this, offset);
+ break;
+ case AltosLib.AO_LOG_FORMAT_TELEGPS:
+ eeprom = new AltosEepromGPS(this, offset);
+ break;
+ case AltosLib.AO_LOG_FORMAT_TELEFIRETWO:
+ eeprom = new AltosEepromFireTwo(this, offset);
+ break;
+ default:
+ throw new ParseException("unknown eeprom format " + log_format, 0);
+ }
+ return eeprom;
+ }
+