From: Linus Torvalds <[email protected]> Date: Fri, 28 Jul 2017 21:33:41 -0700 Subject: [PATCH 5/4] Import all pressure sensors from Liquivision logs
The other pressure sensors were disabled on import because we didn't use to handle multiple sensors well at all. Now it "JustWorks(tm)". Signed-off-by: Linus Torvalds <[email protected]> --- Heh, the Liquivision question on the mailing list made me look at our Liquivision importer, and our old email archives about it. Which included LVD file examples from Tim Thaler that had test cases. So, I just tried it out, and it worked. Instead of the pressure jumping back-and-forth between the two sensors, you get two nice lines of pressures for the two sensors. core/liquivision.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/liquivision.c b/core/liquivision.c index dae9ae81..8ed358a0 100644 --- a/core/liquivision.c +++ b/core/liquivision.c @@ -310,8 +310,7 @@ static void parse_dives (int log_version, const unsigned char *buf, unsigned int if (log_version == 3) { ps_ptr += handle_event_ver3(event_code, ps, ps_ptr, &event); - // Ignoring the buddy sensor for now as we cannot draw it on the profile. - if ((event_code != 0xf) || (event.pressure.sensor != 0)) + if (event_code != 0xf) continue; // ignore all but pressure sensor event } else { // version 2 ps_ptr += handle_event_ver2(event_code, ps, ps_ptr, &event); -- 2.14.0.rc1.2.g4c8247ec3 _______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
