diff options
author | Bdale Garbee <bdale@gag.com> | 2012-05-16 09:13:53 -0600 |
---|---|---|
committer | Bdale Garbee <bdale@gag.com> | 2012-05-16 09:13:53 -0600 |
commit | 6a973f788563ccc66b01cc7557a004dabef18d09 (patch) | |
tree | ffbc8faad73cde7934c4050deb840092430a311f /altosui/AltosTelemetryIterable.java | |
parent | d387f246b24502642b76aad04eb3e0f1a5b78a05 (diff) | |
parent | da2c920b9f3378d5a18551e008c1da5dace1e0ef (diff) |
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'altosui/AltosTelemetryIterable.java')
-rw-r--r-- | altosui/AltosTelemetryIterable.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/altosui/AltosTelemetryIterable.java b/altosui/AltosTelemetryIterable.java index 278cbfb7..a1b25332 100644 --- a/altosui/AltosTelemetryIterable.java +++ b/altosui/AltosTelemetryIterable.java @@ -88,6 +88,15 @@ public class AltosTelemetryIterable extends AltosRecordIterable { if (previous != null) records.add(previous); + /* Adjust all tick counts to match expected eeprom values, + * which starts with a 16-bit tick count 16 samples before boost + */ + + int tick_adjust = (boost_tick - 16) & 0xffff0000; + for (AltosRecord r : this) + r.tick -= tick_adjust; + boost_tick -= tick_adjust; + /* adjust all tick counts to be relative to boost time */ for (AltosRecord r : this) r.time = (r.tick - boost_tick) / 100.0; |