diff options
author | Keith Packard <keithp@keithp.com> | 2010-07-31 10:05:15 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2010-07-31 10:05:15 -0700 |
commit | 1c3b2fe357d6acf28f48aeddd91693f10381be51 (patch) | |
tree | 2d83dd25f70b6462c0fd9eed3b9360dbec2d05c4 | |
parent | e286eb61ad2a90746c1c31f95d26d5edb48738d3 (diff) |
altosui: Capture config and version info in .eeprom files
Instead of only writing the serial number to the .eeprom file, write
all of the config values and all of the version reply to the .eeprom
file. The config values, in particular, contain the accelerometer
calibration data which is needed to correctly compute acceleration
from the captured accelerometer data.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | ao-tools/altosui/AltosEepromDownload.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ao-tools/altosui/AltosEepromDownload.java b/ao-tools/altosui/AltosEepromDownload.java index 756b82d1..1f4a278f 100644 --- a/ao-tools/altosui/AltosEepromDownload.java +++ b/ao-tools/altosui/AltosEepromDownload.java @@ -103,7 +103,7 @@ public class AltosEepromDownload implements Runnable { AltosFile eeprom_name; LinkedList<String> eeprom_pending = new LinkedList<String>(); - serial_line.printf("v\n"); + serial_line.printf("\nc s\nv\n"); /* Pull the serial number out of the version information */ @@ -113,12 +113,13 @@ public class AltosEepromDownload implements Runnable { if (line.startsWith("serial-number")) { try { serial = Integer.parseInt(line.substring(13).trim()); - eeprom_pending.add(String.format("%s\n", line)); } catch (NumberFormatException ne) { serial = 0; } } + eeprom_pending.add(String.format("%s\n", line)); + /* signals the end of the version info */ if (line.startsWith("software-version")) break; |