<feed xmlns='http://www.w3.org/2005/Atom'>
<title>subsurface.git/dives, branch master</title>
<subtitle>forked from https://github.com/subsurface/subsurface</subtitle>
<id>https://git.tsegers.com/subsurface.git/atom?h=master</id>
<link rel='self' href='https://git.tsegers.com/subsurface.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/'/>
<updated>2021-10-01T15:50:36Z</updated>
<entry>
<title>Don't access gasmix.o2.fraction</title>
<updated>2021-10-01T15:50:36Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2021-10-01T13:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=41258647d232a24adca394202b44b204409b4c9f'/>
<id>urn:sha1:41258647d232a24adca394202b44b204409b4c9f</id>
<content type='text'>
Air is a special gas that does not contain oxygen according
to gasmix.o2.fraction. If you want to use the fo2, you
need to use get_o2() to treat this special case correctly.

This fixes a bug when setting the MND of a gas containing
21% oxygen when o2 is considered not narcotic.

Reported-by: Christoph Gruen &lt;gruen.christoph@gmail.com&gt;
Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>Adopt tests to updated CNS and OTU calculations</title>
<updated>2021-08-19T17:58:08Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2021-08-18T22:14:22Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2126ac7c25aeb4d0269f464dcdb8e34c203d4d29'/>
<id>urn:sha1:2126ac7c25aeb4d0269f464dcdb8e34c203d4d29</id>
<content type='text'>
Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>Clean up divecomputer 'device' handling</title>
<updated>2021-08-18T20:22:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2021-08-16T22:50:11Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=6c4e890960036b127eab513ca967e9454bc63d54'/>
<id>urn:sha1:6c4e890960036b127eab513ca967e9454bc63d54</id>
<content type='text'>
We have this odd legacy notion of a divecomputer 'device', that was
originally just basically the libdivecomputer 'EVENT_DEVINFO' report
that was associated with each dive.  So it had firmware version,
deviceid, and serial number.

It had also gotten extended to do 'nickname' handling, and it was all
confusing, ugly and bad.  It was particularly bad because it wasn't
actually a 'per device' thing at all: due to the firmware field, a dive
computer that got a firmware update forced a new 'device'.

To make matters worse, the 'deviceid' was also almost random, because
we've calculated it a couple of different ways, and libdivecomputer
itself has changed how the legacy 32-bit 'serial number' is expressed.

Finally, because of all these issues, we didn't even try to make the
thing unique, so it really ended up being a random snapshot of the state
of the dive computer at the time of a dive, and sometimes we'd pick one,
and sometimes another, since they weren't really well-defined.

So get rid of all this confusion.

The new rules:

 - the actual random dive computer state at the time of a dive is kept
   in the dive data. So if you want to know the firmware version, it
   should be in the 'extra data'

 - the only serial number that matters is the string one in the extra
   data, because that's the one that actually matches what the dive
   computer reports, and isn't some random 32-bit integer with ambiguous
   formatting.

 - the 'device id' - the thing we match with (together with the model
   name, eg "Suunto EON Steel") is purely a hash of the real serial
   number.

   The device ID that libdivecomputer reports in EVENT_DEVINFO is
   ignored, as is the device ID we've saved in the XML or git files. If
   we have a serial number, the device ID will be uniquely associated
   with that serial number, and if we don't have one, the device ID will
   be zero (for 'match anything').

   So now 'deviceid' is literally just a shorthand for the serial number
   string, and the two are joined at the hip.

 - the 'device' managament is _only_ used to track devices that have
   serial numbers _and_ nicknames. So no more different device
   structures just because one had a nickname and the other didn't etc.

   Without a serial number, the device is 'anonymous' and fundamentally
   cannot be distinguished from other devices of the same model, so a
   nickname is meaningless. And without a nickname, there is no point in
   creating a device data structure, since all the data is in the dive
   itself and the device structure wouldn't add any value..

These rules mean that we no longer have ambiguous 'device' structures,
and we can never have duplicates that can confuse us.

This does mean that you can't give a nickname to a device that cannot be
uniquely identified with a serial number, but those are happily fairly
rare (and mostly older ones).  Dirk said he'd look at what it takes to
give more dive computers proper serial numbers, and I already did it for
the Garmin Descent family yesterday.

(Honesty in advertizing: right now you can't add a nickname to a dive
computer that doesn't already have one, because such a dive computer
will not have a device structure.  But that's a UI issue, and I'll sort
that out separately)

Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>core: always create a fake profile if there are no samples</title>
<updated>2021-07-23T18:30:17Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2021-07-15T07:14:31Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=846e1ba53e32aaeae22b72d4a7843700627f2b27'/>
<id>urn:sha1:846e1ba53e32aaeae22b72d4a7843700627f2b27</id>
<content type='text'>
Before making the cylinder-table dynamic, dives always
had at least one cylinger. When such a dive is displayed,
the TabDiveInformation class calls per_cylinder_mean_depth().
If there are no samples, this function generates a "fake
profile" with fake_dc(). Thus, effectively dives always
had samples once the user was displaying them.

When the cylinder-table was made dynamic, dives without
cylinders were supported. This can notably happen, when
importing from CSV (this could actually be a bug).
per_cylinder_mean_depth() exits early in that case and
doesn't create a fake profile. This lead to crashes
of the profile-widget, which were fixed in 6b2e56e5131.
Non-sample dives were now shown with the Subsurface-logo.

To restore the previous behavior, genarate a fake profile
for sample-less dives in fixup_dive(), which is called
anytime  a dive is loaded or imported. This seems to
have been the intention anyway and this worked only
"by chance". This will make a few fake_dc() calls obsolete,
but so be it.

Since fake profiles are now generated on loading,
the parse-tests need to be fixed to account for that.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
Signed-off-by: Dirk Hohndel &lt;dirk@hohndel.org&gt;
</content>
</entry>
<entry>
<title>Add test for profile in VPMB mode</title>
<updated>2021-03-24T17:30:22Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2021-02-26T13:03:31Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=1c8c6f95512988b66442341e35beda0377b7d7c3'/>
<id>urn:sha1:1c8c6f95512988b66442341e35beda0377b7d7c3</id>
<content type='text'>
For some reason, this test seems not to run effectively, at least
locally, I had to update the reference file.

Added a check that indeed the file to be compared was
successfully opened.

Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>Fix pO2 for CCR at shallow depths</title>
<updated>2021-02-26T16:42:30Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2021-02-23T10:36:00Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=2064ce06cc02b6fc390fdf9bbe05fb60babc0d4b'/>
<id>urn:sha1:2064ce06cc02b6fc390fdf9bbe05fb60babc0d4b</id>
<content type='text'>
Even when diving a CCR, the pO2 cannot exceed ambient
pressure. This only makes a difference at shallow depths.

Fix this in the calculation of OTUs and CNS.

This affects some tests that now have slightly different CNS and OTU values.

Suggested-by: Justin Ashworth
Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>Implement Seac SeacSync databaser parser.</title>
<updated>2020-09-04T12:54:08Z</updated>
<author>
<name>James Wobser</name>
<email>james.wobser@gmail.com</email>
</author>
<published>2020-07-17T01:40:46Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=4f3b26f9b6296273e37ec317bc68f32f94f546dc'/>
<id>urn:sha1:4f3b26f9b6296273e37ec317bc68f32f94f546dc</id>
<content type='text'>
Dives for the seac action computer are imported by the seacsync
program into two tables in an sqlite3 database.

The dive information is read from the headers_dive table.
The dive_data table is then queried for each dive to get samples.

The seac action computer is the only current supported computer
by the seacsync program. It only supports two gas mixes, so the
parser will toggle between two cylinders whenever it detects a
change in the active O2 mix.

Dive start time is stored in UTC with a timezone offset.
A helper function to read this was added to qthelper.

Default cases have been added to some switch statements
to assist in future development for other dive types and
salinity.

Example database has been added to ./dives/TestDiveSeacSync.db

Signed-off-by: James Wobser &lt;james.wobser@gmail.com&gt;
</content>
</entry>
<entry>
<title>Save SAC, OTU and CNS in the XML export</title>
<updated>2020-05-14T20:27:07Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-05-14T16:48:09Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=62e95fdc8656a0c8fdb181c3fe0a48e043650a05'/>
<id>urn:sha1:62e95fdc8656a0c8fdb181c3fe0a48e043650a05</id>
<content type='text'>
We do _not_ read them back, since they are calculated values, although I
guess we could aim to do that too at some point in case we have an
import from somewhere else that has these values but not the profile (or
gas use) to actually calculate them.

Fix test-cases that are checked by TestParse (but nothing else) to match.

Requested-by: Miika Turkia &lt;miika.turkia@gmail.com&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Add test for profile data</title>
<updated>2020-05-04T20:39:18Z</updated>
<author>
<name>Robert C. Helling</name>
<email>helling@atdotde.de</email>
</author>
<published>2020-05-02T19:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=b3270222fd884c2b1c68519bdadf7fbc357a5d06'/>
<id>urn:sha1:b3270222fd884c2b1c68519bdadf7fbc357a5d06</id>
<content type='text'>
There was a TestProfile but that was a stub that did not test anything.

We have an export function that serialises the profile data
(including lots of derived data like deco information and
cylinder pressure interpolation). So here is now a simple
tests that can detect regressions in the profle.

Signed-off-by: Robert C. Helling &lt;helling@atdotde.de&gt;
</content>
</entry>
<entry>
<title>cleanup: move clearing of device nodes to clear_dive_file_data()</title>
<updated>2020-04-24T17:40:12Z</updated>
<author>
<name>Berthold Stoeger</name>
<email>bstoeger@mail.tuwien.ac.at</email>
</author>
<published>2020-04-23T21:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.tsegers.com/subsurface.git/commit/?id=17526ded58703064dedebdf53669e12f0ab4f43e'/>
<id>urn:sha1:17526ded58703064dedebdf53669e12f0ab4f43e</id>
<content type='text'>
It makes no sense to keep the device nodes if all the other data
is cleared. Let's do this automatically and not explicitly.
This ensures that the function is also called on mobile.
Currently it was only called on desktop.

Weirdly, the parser-tests were expecting that the device nodes
were not reset by clear_dive_file_data() and therefore divecomputers
were accumulating in the test results. Thus, the additional
computers had to be removed from the expected test results.

Signed-off-by: Berthold Stoeger &lt;bstoeger@mail.tuwien.ac.at&gt;
</content>
</entry>
</feed>
