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 <helling@atdotde.de>
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 <miika.turkia@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The code incorrectly divided the temperature by 10 as an integer,
causing unnecessary precision loss due to truncation.
Fix it, and update the test results for the now improved temperature
import.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With commit b26e516e2a ("Dive_sites-Notes shouldn't be stored as
attribute") our output format changed slightly. Adjust the expected output
to match that change to ensure that TestParse passes again.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Also fixed it to correctly parse the mean depth (duh, a test that had a
bug) and added a buddy field for good measure.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
With no V2 question shown
- parsing fails when a V2 file is loaded
- parsing succeeds when a V3 file is loaded
- import of CSV file succeeds
With V2 question shown
- parsing succeeds when a V2 file is loaded
Finally compare the output of reading in the various files with reference
output included in the sources.
My guess is that this test might be a bit fragile, but hey, it's a start.
(reminder: the tests only get built when using cmake)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>