projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altosui: Clean up eeprom parsing a bit
[fw/altos]
/
altosui
/
AltosEepromChunk.java
diff --git
a/altosui/AltosEepromChunk.java
b/altosui/AltosEepromChunk.java
index 1e42077ff01f5168593ca3df415cedf34b12540a..fb632a3f50fd6f8b9b8964ae3cefb33221d47eef 100644
(file)
--- a/
altosui/AltosEepromChunk.java
+++ b/
altosui/AltosEepromChunk.java
@@
-52,6
+52,13
@@
public class AltosEepromChunk {
return data[offset] | (data[offset + 1] << 8);
}
return data[offset] | (data[offset + 1] << 8);
}
+ boolean erased(int start, int len) {
+ for (int i = 0; i < len; i++)
+ if (data[start+i] != 0xff)
+ return false;
+ return true;
+ }
+
public AltosEepromChunk(AltosSerial serial_line, int block)
throws TimeoutException, InterruptedException {
public AltosEepromChunk(AltosSerial serial_line, int block)
throws TimeoutException, InterruptedException {