summaryrefslogtreecommitdiff
path: root/altosui/AltosEepromChunk.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-06-01 19:51:25 -0700
committerKeith Packard <keithp@keithp.com>2012-06-01 19:51:25 -0700
commit1824761f5b98e92485e2dd347b1c4d043ec207e2 (patch)
tree9c84ad0d7b4007ce668b901091695fc4ddbebd5e /altosui/AltosEepromChunk.java
parentab85337aa942cb73a08bd3b783771179773b9a67 (diff)
altosui: Quick hacks to download megametrum data and convert to CSV
Very little useful data crunching is done, but at least we can save and convert files Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altosui/AltosEepromChunk.java')
-rw-r--r--altosui/AltosEepromChunk.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/altosui/AltosEepromChunk.java b/altosui/AltosEepromChunk.java
index 59767c2a..77707f7b 100644
--- a/altosui/AltosEepromChunk.java
+++ b/altosui/AltosEepromChunk.java
@@ -52,6 +52,11 @@ public class AltosEepromChunk {
return data[offset] | (data[offset + 1] << 8);
}
+ int data32(int offset) {
+ return data[offset] | (data[offset + 1] << 8) |
+ (data[offset+2] << 16) | (data[offset+3] << 24);
+ }
+
boolean erased(int start, int len) {
for (int i = 0; i < len; i++)
if (data[start+i] != 0xff)