projects
/
fw
/
altos
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0e917f3
)
altosui: Add comments to Eeprom reader
author
Keith Packard
<keithp@keithp.com>
Fri, 6 Aug 2010 17:09:21 +0000
(13:09 -0400)
committer
Keith Packard
<keithp@keithp.com>
Fri, 6 Aug 2010 17:09:21 +0000
(13:09 -0400)
ao-tools/altosui/AltosEepromReader.java
patch
|
blob
|
history
diff --git
a/ao-tools/altosui/AltosEepromReader.java
b/ao-tools/altosui/AltosEepromReader.java
index 7a8ff5b036a2f3dc4811bcf607fa2adb81739794..9b928abbfd9795a223f6dd6b5dd539245c5b5b76 100644
(file)
--- a/
ao-tools/altosui/AltosEepromReader.java
+++ b/
ao-tools/altosui/AltosEepromReader.java
@@
-36,6
+36,10
@@
import altosui.AltosLog;
import altosui.AltosVoice;
import altosui.AltosEepromMonitor;
import altosui.AltosVoice;
import altosui.AltosEepromMonitor;
+/*
+ * AltosRecords with an index field so they can be sorted by tick while preserving
+ * the original ordering for elements with matching ticks
+ */
class AltosOrderedRecord extends AltosEepromRecord implements Comparable<AltosOrderedRecord> {
int index;
class AltosOrderedRecord extends AltosEepromRecord implements Comparable<AltosOrderedRecord> {
int index;
@@
-217,6
+221,13
@@
public class AltosEepromReader {
}
}
}
}
+ /*
+ * Read the whole file, dumping records into a RB tree so
+ * we can enumerate them in time order -- the eeprom data
+ * are sometimes out of order with GPS data getting timestamps
+ * matching the first packet out of the GPS unit but not
+ * written until the final GPS packet has been received.
+ */
public AltosEepromReader (FileInputStream in_input) {
state = new AltosRecord();
state.state = Altos.ao_flight_pad;
public AltosEepromReader (FileInputStream in_input) {
state = new AltosRecord();
state.state = Altos.ao_flight_pad;