[PATCH 1/2] Fix divinglog import limit checking

Dirk Hohndel dirk at hohndel.org
Sat Oct 7 15:01:37 PDT 2017


Looking through your patch, I notice that you extract rbt and otu - but then never seem
to do anything with them...

> On Oct 7, 2017, at 1:48 PM, Linus Torvalds <torvalds at linux-foundation.org> wrote:
> -	for (i = 0, ptr = data[1]; i * 12 < len; ++i) {
> -		sample_start();
> +		if (len2 >= 11) {
> +			int temp = atoi_n(ptr2, 3);
> +			int pressure = atoi_n(ptr2+3, 4);
> +			int tank = atoi_n(ptr2+7, 1);
> +			int rbt = atoi_n(ptr2+8, 3) * 60;

[...]

> +		if (len5 >= 19) {
> +			int ppo2_1 = atoi_n(ptr5 + 0, 3);
> +			int ppo2_2 = atoi_n(ptr5 + 3, 3);
> +			int ppo2_3 = atoi_n(ptr5 + 6, 3);
> +			int otu = atoi_n(ptr5 + 9, 4);
> +			int cns = atoi_n(ptr5 + 13, 4);
> +			int setpoint = atoi_n(ptr5 + 17, 2);


Of course, reading the code before your changes isn't all that enlightening,
so I'm not sure what to do here... do we want to set these values in the events?

/D



More information about the subsurface mailing list