- 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);
-
- if (values == null || values.length < 9) {
- System.out.printf("invalid line %s", line);
- throw new ParseException(String.format("inalid line %s", line), 0);
- }
- if (values[0] != (addr & 0xff))
- throw new ParseException(String.format("data address out of sync at 0x%x",
- addr), 0);
- int i;
- for (i = 1; i < values.length; i++)
- if (values[i] != 0xff)
- break;
- cmd = values[1];