altosui: Fill in time value of last Eeprom record read from file
authorKeith Packard <keithp@keithp.com>
Fri, 10 Sep 2010 06:04:14 +0000 (23:04 -0700)
committerKeith Packard <keithp@keithp.com>
Fri, 10 Sep 2010 06:07:16 +0000 (23:07 -0700)
The last record is handled separately, and was missing the code to
compute the time. Sigh.

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/altosui/AltosEepromReader.java

index cb82f9a..f1d6a6a 100644 (file)
@@ -114,7 +114,9 @@ public class AltosEepromReader extends AltosReader {
                                        if (last_reported)
                                                return null;
                                        last_reported = true;
-                                       return new AltosRecord(state);
+                                       AltosRecord r = new AltosRecord(state);
+                                       r.time = (r.tick - boost_tick) / 100.0;
+                                       return r;
                                }
                                record = record_iterator.next();