projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump version to build a new android app (23)
[fw/altos]
/
altoslib
/
AltosEepromRecordSet.java
diff --git
a/altoslib/AltosEepromRecordSet.java
b/altoslib/AltosEepromRecordSet.java
index 360759314d4bf9e123bf2e109271f66beb6375ff..5e2adba34c00ae9cf4e4a9915f52d8b531d75252 100644
(file)
--- a/
altoslib/AltosEepromRecordSet.java
+++ b/
altoslib/AltosEepromRecordSet.java
@@
-12,7
+12,7
@@
* General Public License for more details.
*/
* General Public License for more details.
*/
-package org.altusmetrum.altoslib_1
2
;
+package org.altusmetrum.altoslib_1
3
;
import java.io.*;
import java.util.*;
import java.io.*;
import java.util.*;
@@
-21,6
+21,7
@@
public class AltosEepromRecordSet implements AltosRecordSet {
AltosEeprom eeprom;
TreeSet<AltosEepromRecord> ordered;
AltosCalData cal_data;
AltosEeprom eeprom;
TreeSet<AltosEepromRecord> ordered;
AltosCalData cal_data;
+ boolean valid;
public AltosConfigData config_data() {
return eeprom.config_data();
public AltosConfigData config_data() {
return eeprom.config_data();
@@
-52,6
+53,10
@@
public class AltosEepromRecordSet implements AltosRecordSet {
listener.finish();
}
listener.finish();
}
+ public boolean valid() {
+ return valid;
+ }
+
public AltosEepromRecordSet(AltosEeprom eeprom) {
this.eeprom = eeprom;
public AltosEepromRecordSet(AltosEeprom eeprom) {
this.eeprom = eeprom;
@@
-71,6
+76,7
@@
public class AltosEepromRecordSet implements AltosRecordSet {
case AltosLib.AO_LOG_FORMAT_TELEMEGA:
case AltosLib.AO_LOG_FORMAT_TELEMEGA_3:
case AltosLib.AO_LOG_FORMAT_TELEMEGA_OLD:
case AltosLib.AO_LOG_FORMAT_TELEMEGA:
case AltosLib.AO_LOG_FORMAT_TELEMEGA_3:
case AltosLib.AO_LOG_FORMAT_TELEMEGA_OLD:
+ case AltosLib.AO_LOG_FORMAT_EASYMEGA_2:
record = new AltosEepromRecordMega(eeprom);
break;
case AltosLib.AO_LOG_FORMAT_TELEMETRUM:
record = new AltosEepromRecordMega(eeprom);
break;
case AltosLib.AO_LOG_FORMAT_TELEMETRUM:
@@
-88,13
+94,20
@@
public class AltosEepromRecordSet implements AltosRecordSet {
case AltosLib.AO_LOG_FORMAT_TELEFIRETWO:
record = new AltosEepromRecordFireTwo(eeprom);
break;
case AltosLib.AO_LOG_FORMAT_TELEFIRETWO:
record = new AltosEepromRecordFireTwo(eeprom);
break;
+ case AltosLib.AO_LOG_FORMAT_MICROPEAK2:
+ record = new AltosEepromRecordMicroPeak2(eeprom);
+ break;
}
}
+ ordered = new TreeSet<AltosEepromRecord>();
+
if (record == null) {
System.out.printf("failed to parse log format %d\n", config_data.log_format);
if (record == null) {
System.out.printf("failed to parse log format %d\n", config_data.log_format);
+ valid = false;
return;
}
return;
}
- ordered = new TreeSet<AltosEepromRecord>();
+ valid = true;
+
int tick = 0;
boolean first = true;
int tick = 0;
boolean first = true;