*
* 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
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-package org.altusmetrum.altoslib_1;
+package org.altusmetrum.altoslib_11;
import java.io.*;
import java.util.*;
public class AltosEepromTM extends AltosEeprom {
public int a;
public int b;
- public boolean tick_valid;
public static final int record_length = 8;
public AltosEepromTM (AltosEepromChunk chunk, int start) throws ParseException {
cmd = chunk.data(start);
- tick_valid = true;
+ valid = true;
- tick_valid = !chunk.erased(start, record_length);
- if (tick_valid) {
+ valid = !chunk.erased(start, record_length);
+ if (valid) {
if (AltosConvert.checksum(chunk.data, start, record_length) != 0)
throw new ParseException(String.format("invalid checksum at 0x%x",
chunk.address + start), 0);
}
public AltosEepromTM (String line) {
- tick_valid = false;
+ valid = false;
tick = 0;
a = 0;
b = 0;
} else {
cmd = tokens[0].codePointAt(0);
tick = Integer.parseInt(tokens[1],16);
- tick_valid = true;
+ valid = true;
a = Integer.parseInt(tokens[2],16);
b = Integer.parseInt(tokens[3],16);
}
}
public AltosEepromTM(int in_cmd, int in_tick, int in_a, int in_b) {
- tick_valid = true;
+ valid = true;
cmd = in_cmd;
tick = in_tick;
a = in_a;