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 cb82f9a9d6ced0f7f37596a178c88e52199d791e..f1d6a6a7d8124b416f0e96246e3dbcf9730ba82e 100644 (file)
@@ -114,7 +114,9 @@ public class AltosEepromReader extends AltosReader {
                                        if (last_reported)
                                                return null;
                                        last_reported = true;
                                        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();
 
                                }
                                record = record_iterator.next();