[PATCH 4/6] Create gaschange events from Poseidon MkVI logs
Dirk Hohndel
dirk at hohndel.org
Thu Nov 20 07:43:26 PST 2014
On Thu, Nov 20, 2014 at 07:30:20AM +0100, Anton Lundin wrote:
> > > @@ -658,6 +662,14 @@ int parse_txt_file(const char *filename, const char *csv)
> > > case 39:
> > > add_sample_data(sample, POSEIDON_TEMP, value);
> > > break;
> > > + case 85:
> > > + //He diluent part in %
> > > + gaschange ^= value << 16;
> > > + break;
> > > + case 86:
> > > + //O2 diluent part in %
> > > + gaschange ^= value;
> > > + break;
> > > default:
> >
> > Bitwise XOR? Seriously?
>
> It just builds a "regular" gaschange value. I can switch it to using add
> there instead, or feel free to s/\^/+/ it. The result is the same.
Well, this is not the obfuscated C contest. Yes, if you know that the
original bits were 0 then XOR acts the same way as OR, but seriously...
What made you write it this way?
/D
More information about the subsurface
mailing list