return true;
}
- public AltosEepromChunk(AltosSerial serial_line, int block)
+ public AltosEepromChunk(AltosSerial serial_line, int block, boolean flush)
throws TimeoutException, InterruptedException {
int offset;
data = new int[chunk_size];
address = block * chunk_size;
- serial_line.flush_input();
+ if (flush)
+ serial_line.flush_input();
serial_line.printf("e %x\n", block);
for (offset = 0; offset < chunk_size; offset += per_line) {
for (block = log.start_block; !done && block < log.end_block; block++) {
monitor.set_value(Altos.state_to_string[state], state, block - state_block);
- AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block);
+ AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block, block == log.start_block);
/*
* Guess what kind of data is there if the device
in_end_block = in_start_block + 2;
for (block = in_start_block; block < in_end_block; block++) {
- AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block);
+ AltosEepromChunk eechunk = new AltosEepromChunk(serial_line, block, block == in_start_block);
for (int i = 0; i < eechunk.chunk_size; i += AltosEepromRecord.record_length) {
try {