summaryrefslogtreecommitdiffstats
path: root/src/tools/g2/clib.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-04-01 11:07:40 -0400
committerDamjan Marion <dmarion.lists@gmail.com>2017-04-01 17:22:31 +0000
commit903fd513e32a37e55aec0cfb4cf30e000680e0c3 (patch)
treec8e85da35fe9d9107cb3737537ccb4957fddc9e0 /src/tools/g2/clib.c
parenta3af337e06a79f7d1dacf42a319f241c907122fc (diff)
Clean up event log merge code
Fix a decade-old ridiculous qsort function bug. Managed to subtract floating-point numbers as if they were integers, leading to manufactured time-paradoxes. That completely confuses g2, leading to the summary disappearance of entire tracks' worth of data at high zoom levels. Add a manual alignment tweak parameter to elog_merge, users can dial-out time paradoxes caused by NTP-grade clock synchronization. The event-logger has a precision of O(100ns), whereas NTP synchronization is O(1ms). Change-Id: I69dedabaa314f69f9df74ec9ee66e21e6c87f703 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/tools/g2/clib.c')
-rw-r--r--src/tools/g2/clib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/tools/g2/clib.c b/src/tools/g2/clib.c
index 6454c84d42d..845026b6b93 100644
--- a/src/tools/g2/clib.c
+++ b/src/tools/g2/clib.c
@@ -130,8 +130,6 @@ int read_clib_file(char *clib_file)
finalize_events();
- em->events = elog_get_events (em);
-
cpel_event_init(vec_len(em->events));
starttime = em->events[0].time;
@@ -152,3 +150,8 @@ int read_clib_file(char *clib_file)
return(0);
}
+
+unsigned int vl(void *a)
+{
+ return vec_len (a);
+}