- int checksum(int[] line) {
- int csum = 0x5a;
- for (int i = 1; i < line.length; i++)
- csum += line[i];
- return csum & 0xff;
- }
-
- public AltosEepromRecord (AltosSerial serial_line, int addr)
- throws TimeoutException, ParseException, InterruptedException {
- String line = serial_line.get_reply(5000);
- if (line == null)
- throw new TimeoutException();
- int[] values = ParseHex(line);