- return AltosConvert.checksum(eeprom.data, s, length) == 0;
+ int ck = AltosConvert.checksum(eeprom.data, s, length);
+
+ if (ck != 0) {
+ ++eeprom.errors;
+ System.out.printf("invalid checksum 0x%x at 0x%x\n", ck, s);
+ return false;
+ }
+ return true;
if (cmd() == AltosLib.AO_LOG_FLIGHT)
cal_data.set_boost_tick();
listener.set_time(cal_data.time());
/* Flush any pending GPS changes */
if (!AltosLib.is_gps_cmd(cmd())) {
if (cmd() == AltosLib.AO_LOG_FLIGHT)
cal_data.set_boost_tick();
listener.set_time(cal_data.time());
/* Flush any pending GPS changes */
if (!AltosLib.is_gps_cmd(cmd())) {
public abstract AltosEepromRecord next();
public AltosEepromRecord(AltosEeprom eeprom, int start, int length) {
this.eeprom = eeprom;
this.start = start;
this.length = length;
public abstract AltosEepromRecord next();
public AltosEepromRecord(AltosEeprom eeprom, int start, int length) {
this.eeprom = eeprom;
this.start = start;
this.length = length;