<div dir="ltr"><div><div>No worries. It was more of an inconvenience than a hard problem, especially now that I understand how to work around the issue (which turned out to be relatively simple).<br><br></div>Please let me know if I can be of any assistance once you get to that point. While I'm unlikely to be of much use on the coding side, I'm more than happy to provide data and help with testing.<br><br></div>Thanx!<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 11, 2016 at 2:04 AM, Jef Driesen <span dir="ltr"><<a href="mailto:jef@libdivecomputer.org" target="_blank">jef@libdivecomputer.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It's on my todo list to look into this. But at the moment I'm a bit overwhelmed with bug reports, so it's going to take a bit longer.<br>
<br>
Most likely the problem is that a tank switch sample also includes a pressure value. That's where we get that initial pressure from. I suspect there might be some bits to indicate there is no sensor attached, and thus no (valid) pressure value.<br>
<br>
Jef<br>
<br>
On 11-11-16 01:35, Adric Norris wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
For what it's worth, the visible issue *appears* to be caused by a bogus<div><div class="h5"><br>
initial pressure reading from the first sample after the air source was<br>
switched. Applying the following diff to the XML and re-importing the dive<br>
seems to get everything looking back to normal.<br>
<br>
$ diff -u test.xml test-fixed.xml<br>
--- test.xml    2016-11-06 08:07:47.592116207 -0600<br>
+++ test-fixed.xml    2016-11-10 18:26:<a href="tel:17.323748662" value="+17323748662" target="_blank">17.323748662</a> -0600<br>
@@ -182,7 +182,7 @@<br>
   <sample time='41:30 min' depth='10.954 m' pressure='48.953 bar' /><br>
   <sample time='41:45 min' depth='10.649 m' /><br>
   <sample time='42:00 min' depth='10.516 m' pressure='47.919 bar' /><br>
-  <sample time='42:15 min' depth='10.287 m' pressure='336.464 bar'<br>
sensor='1' /><br>
+  <sample time='42:15 min' depth='10.287 m' sensor='1' /><br>
   <sample time='42:30 min' depth='9.754 m' /><br>
   <sample time='42:45 min' depth='10.363 m' /><br>
   <sample time='43:00 min' depth='10.516 m' /><br>
<br>
As mentioned previously, there was no transmitter present on the pony<br>
regulator, so I don't believe it should have included the pressure<br>
attribute in any event. No idea how it managed to get there in the first<br>
case.<br>
<br>
On Sun, Nov 6, 2016 at 9:09 AM, Adric Norris <<a href="mailto:landstander668@gmail.com" target="_blank">landstander668@gmail.com</a>><br>
wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
I've encountered a bit of an oddity with reported air pressure on my most<br>
recent dive, which I believe can only be explained by a bug of some sort...<br>
no idea if it resides in my Oceanic VT4.1 dive computer, Subsurface, or<br>
libdivecomputer. Specifically, the graph displays an impossible ending<br>
pressure. I've confirmed that my computer has the current firmware<br></div></div>
<<a href="http://www.oceanicworldwide.com/us/support/software/" rel="noreferrer" target="_blank">http://www.oceanicworldwide.c<wbr>om/us/support/software/</a>> (2B03) loaded, for<span class=""><br>
what that's worth, and I'm using the Linux appimage of Subsurface<br>
4.5.95-25-g02389c95cb59.<br>
<br>
My dive computer supports four air sources, although prior to the dive in<br>
question I had never made use of more than one. On this occasion, however,<br>
I was practicing deployment and use of a 19cuft pony bottle near the end of<br>
the dive... since I was expecting to use it for around 10 minutes, I<br>
decided to switch my computer to the second air source as well. In<br>
hindsight this wasn't really necessary, as the pony regulator doesn't<br>
currently have a transmitter, but it seemed reasonable at the time. Both<br>
tanks were filled with ordinary air, so there was no difference in the air<br>
mix configured for each source on my dive computer, and had a starting<br>
pressure of approximately 3000 PSI (200 bar). The main tank (the one with<br>
the transmitter) ended with about 700 PSI (48 bar).<br>
<br>
Air usage on the graph looks normal up until the time the air source was<br>
switched, at which point it displays a pressure of 4880 PSI (336 bar) for<br>
the remainder of the dive. Although it makes sense that it would show a<br>
constant pressure (due to the lack of a transmitter), I don't understand<br>
how it could possibly come up with the displayed value (especially knowing<br>
the ending value of the main tank).<br>
<br>
I've made the following files available at <a href="https://drive.google.com/open" rel="noreferrer" target="_blank">https://drive.google.com/open</a>?<br>
id=0B-3AX-51D0csZ3I1dFNkR2FUYm<wbr>M:<br>
<br></span>
   - *subsurface-libdivecomputer-du<wbr>mp.bin* - libdivecomputer dumpfile<span class=""><br>
   covering around 70 dives (since I had to force a re-download), but the dive<br>
   in question is the very last item.<br></span>
   - *subsurface-libdivecomputer-du<wbr>mp.log* - libdivecomputer logfile<span class=""><br>
   covering the same "import" where the dumpfile was captured.<br></span>
   - *subsurface.log* - libdivecomputer logfile, covering import of only<span class=""><br>
   the dive in question (although I still had to force a re-download).<br></span>
   - *subsurface-terminal.out* - Output produced by running Subsurface<br>
   from the terminal.<br>
   - *text.xml* - Subsurface XML file containing just the dive in<span class=""><br>
   question. Please note that it was saved immediately after import, with no<br>
   manual changes having been made.<br>
<br>
On my real logbook, saved to cloud storage, I did manually add a second<br>
tank with the relevant capacity and start/end pressures. This didn't make<br>
any apparent difference to the graph, however.<br>
<br></span>
At this point I have *not* tried to reproduce the issue under the latest<span class=""><br>
official release (4.5.6). I'll be happy to do so if you like, however, so<br>
please let me know.<br>
<br>
Thanx!<br>
<br>
--<br>
"In the beginning the Universe was created. This has made a lot of people<br>
very angry and been widely regarded as a bad move." -Douglas Adams<br>
<br>
</span></blockquote>
<br>
<br>
<br>
<br>
<br>
______________________________<wbr>_________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org" target="_blank">subsurface@subsurface-divelog.<wbr>org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer" target="_blank">http://lists.subsurface-divelo<wbr>g.org/cgi-bin/mailman/listinfo<wbr>/subsurface</a><br>
<br>
</blockquote>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">"In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." -Douglas Adams<br></div></div>
</div>