[PATCH 1/2] Fix divinglog import limit checking
Linus Torvalds
torvalds at linux-foundation.org
Sat Oct 7 16:25:51 PDT 2017
On Sat, Oct 7, 2017 at 3:01 PM, Dirk Hohndel <dirk at hohndel.org> wrote:
> Looking through your patch, I notice that you extract rbt and otu - but then never seem
> to do anything with them...
Right. I extracted them because it actually made the code easier to
read (matching the descriptions), but the old code didn't actually use
the values.
The test-case doesn't actually have RBT values at all (because they no
cylinder pressure sensor either), and OTU we don't even save at that
level anyway.
Anyway, the appended intentionally whitespace-mangled trivial
one-liner should save the RBT value, but because of lack of test
values, I'm not sure what it's worth - I'd like somebody that has test
data (Miika?) to verify that it actually does work..
Linus
---
diff --git a/core/parse-xml.c b/core/parse-xml.c
index d6954555..a2365c0a 100644
--- a/core/parse-xml.c
+++ b/core/parse-xml.c
@@ -3296,6 +3296,7 @@ extern int divinglog_profile(void *handle,
int columns, char **data, char **colu
cur_sample->temperature.mkelvin = C_to_mkelvin(temp / 10.0f);
cur_sample->pressure[0].mbar = pressure * 100;
+ cur_sample->rbt.seconds = rbt;
if (oldcyl != tank) {
struct gasmix *mix = &cur_dive->cylinder[tank].gasmix;
int o2 = get_o2(mix);
More information about the subsurface
mailing list