<div dir="auto"><div>I'll test them either way once a binary is available. This problem has affected me too. <br><br><div class="gmail_quote"><div dir="ltr">On Wed, 20 Jun 2018, 20:20 Dirk Hohndel, <<a href="mailto:dirk@hohndel.org">dirk@hohndel.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, Anton. This looks reasonable. Assuming Linus sees no issue we can add this today and if Davide is still interested he can test the new binaries.<br>
<br>
/D<br>
<br>
> On Jun 21, 2018, at 4:06 AM, Anton Lundin <<a href="mailto:glance@acc.umu.se" target="_blank" rel="noreferrer">glance@acc.umu.se</a>> wrote:<br>
> <br>
> Of course I forgot to even compile it, so here's a updated 0002 patch<br>
> which actually compiles.<br>
> <br>
> <br>
> //Anton<br>
> <br>
> <br>
> On 20 June, 2018 - Anton Lundin wrote:<br>
> <br>
>> Here's the patches.<br>
>> <br>
>> I splitted them into two, so Jef can cherry-pick the first one, and a<br>
>> second one which adds a strings that says the source of the PPO2 values.<br>
>> <br>
>> <br>
>> //Anton<br>
>> <br>
>> <br>
>> On 18 June, 2018 - Dirk Hohndel wrote:<br>
>> <br>
>>> As I said before, I can't seem to find that patch. No idea why. If someone sends it to me I'll be happy to add it. I said that before as well.<br>
>>> If hate to see Davide abandon Subsurface over this...<br>
>>> <br>
>>> /D<br>
>>> <br>
>>> On June 18, 2018 5:39:43 AM GMT+09:00, "Long, Martin" <<a href="mailto:martin@longhome.co.uk" target="_blank" rel="noreferrer">martin@longhome.co.uk</a>> wrote:<br>
>>>> Dirk,<br>
>>>> <br>
>>>> I would say that Anton's patch would do it as an interim solution. Jef<br>
>>>> isn't keen, as he has a better solution, but doesn't have the time to<br>
>>>> work<br>
>>>> on it yet. However, it does remove the regression, and prevent further<br>
>>>> loss<br>
>>>> of data in imports, until the *ideal* solution can be added. Data is<br>
>>>> still<br>
>>>> being lost, which is frustrating - I can't seem my actual ppO2 from<br>
>>>> dives I<br>
>>>> did yesterday, and now I never will, for those dives.<br>
>>>> <br>
>>>> Rather take an imperfect patch, which works now, than leave it broken<br>
>>>> waiting for the perfect one (and no idea of how long it will take).<br>
>>>> <br>
>>>> On 17 June 2018 at 12:02, Dirk Hohndel <<a href="mailto:dirk@hohndel.org" target="_blank" rel="noreferrer">dirk@hohndel.org</a>> wrote:<br>
>>>> <br>
>>>>> <br>
>>>>> On Jun 17, 2018, at 6:52 PM, Davide DB <<a href="mailto:dbdavide@gmail.com" target="_blank" rel="noreferrer">dbdavide@gmail.com</a>> wrote:<br>
>>>>> <br>
>>>>> On Thu, Jun 14, 2018, 15:34 Long, Martin <<a href="mailto:martin@longhome.co.uk" target="_blank" rel="noreferrer">martin@longhome.co.uk</a>><br>
>>>> wrote:<br>
>>>>> <br>
>>>>>> I'm in agreement with Davide that any interim solution we can get<br>
>>>> running<br>
>>>>>> is better than the way it is working now. It's a regression, and tbh<br>
>>>> if<br>
>>>>>> there isn't an interim solution then it ought to be reverted to the<br>
>>>> old<br>
>>>>>> behaviour. At the moment I'm having to use Shearwater desktop for<br>
>>>> reviewing<br>
>>>>>> all my logs.<br>
>>>>>> <br>
>>>>> <br>
>>>>> I had to stop using Subsurface for the time being. First time in so<br>
>>>> many<br>
>>>>> years.<br>
>>>>> <br>
>>>>> If the bug will be solved I would have to transfer and compile from<br>
>>>>> scratch more than 60 dives (until now). I don't know if I will have<br>
>>>> the<br>
>>>>> time or will to do all this work and frankly speaking I'm tired to be<br>
>>>>> always a minority.<br>
>>>>> <br>
>>>>> Farewell my friends. It has been a nice journey. Thank you all for<br>
>>>> the<br>
>>>>> amazing work.<br>
>>>>> <br>
>>>>>> <br>
>>>>> Sorry to see you leave and thank you for all the great contributions.<br>
>>>>> Subsurface-mobile wouldn't be anywhere near where it is today if it<br>
>>>> wasn't<br>
>>>>> for you.<br>
>>>>> <br>
>>>>> I'll admit that I completely tune out rebreather discussions - I<br>
>>>> assume<br>
>>>>> that those who care about rebreathers will figure things out and will<br>
>>>> send<br>
>>>>> me pull requests.<br>
>>>>> <br>
>>>>> Since I'd hate to see you go, is there actually something that we can<br>
>>>> do<br>
>>>>> to fix this? Or are we (as in so many small odd corner cases) at a<br>
>>>> point<br>
>>>>> where we just don't have the right person to work on something (like<br>
>>>> the<br>
>>>>> FTDI download on Android)?<br>
>>>>> <br>
>>>>> /D<br>
>>>>> <br>
>>>>> <br>
>>> <br>
>>> -- <br>
>>> from my phone.<br>
>> <br>
>>> _______________________________________________<br>
>>> subsurface mailing list<br>
>>> <a href="mailto:subsurface@subsurface-divelog.org" target="_blank" rel="noreferrer">subsurface@subsurface-divelog.org</a><br>
>>> <a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
>> <br>
>> <br>
>> -- <br>
>> Anton Lundin +46702-161604<br>
> <br>
>>> From c60d498661bac58e4182dfaab8d7e3e27b968b5b Mon Sep 17 00:00:00 2001<br>
>> From: Anton Lundin <<a href="mailto:glance@acc.umu.se" target="_blank" rel="noreferrer">glance@acc.umu.se</a>><br>
>> Date: Wed, 20 Jun 2018 20:04:55 +0200<br>
>> Subject: [PATCH 1/2] shearwater: Fallback to average/voted ppo2<br>
>> <br>
>> If we can't find any calibration values for the individual sensors,<br>
>> fallback to emitting the average/voted ppo2 instead, so users always get<br>
>> a ppo2 value.<br>
>> <br>
>> Signed-off-by: Anton Lundin <<a href="mailto:glance@acc.umu.se" target="_blank" rel="noreferrer">glance@acc.umu.se</a>><br>
>> ---<br>
>> src/shearwater_predator_parser.c | 26 +++++++++++++-------------<br>
>> 1 file changed, 13 insertions(+), 13 deletions(-)<br>
>> <br>
>> diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c<br>
>> index dda042c..6b1ae43 100644<br>
>> --- a/src/shearwater_predator_parser.c<br>
>> +++ b/src/shearwater_predator_parser.c<br>
>> @@ -669,19 +669,19 @@ shearwater_predator_parser_samples_foreach (dc_parser_t *abstract, dc_sample_cal<br>
>>              if ((status & OC) == 0) {<br>
>>                      // PPO2<br>
>>                      if ((status & PPO2_EXTERNAL) == 0) {<br>
>> -#ifdef SENSOR_AVERAGE<br>
>> -                            sample.ppo2 = data[offset + 6] / 100.0;<br>
>> -                            if (callback) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> -#else<br>
>> -                            sample.ppo2 = data[offset + 12] * parser->calibration[0];<br>
>> -                            if (callback && (parser->calibrated & 0x01)) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> -<br>
>> -                            sample.ppo2 = data[offset + 14] * parser->calibration[1];<br>
>> -                            if (callback && (parser->calibrated & 0x02)) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> -<br>
>> -                            sample.ppo2 = data[offset + 15] * parser->calibration[2];<br>
>> -                            if (callback && (parser->calibrated & 0x04)) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> -#endif<br>
>> +                            if (!parser->calibrated) {<br>
>> +                                    sample.ppo2 = data[offset + 6] / 100.0;<br>
>> +                                    if (callback) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> +                            } else {<br>
>> +                                    sample.ppo2 = data[offset + 12] * parser->calibration[0];<br>
>> +                                    if (callback && (parser->calibrated & 0x01)) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> +<br>
>> +                                    sample.ppo2 = data[offset + 14] * parser->calibration[1];<br>
>> +                                    if (callback && (parser->calibrated & 0x02)) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> +<br>
>> +                                    sample.ppo2 = data[offset + 15] * parser->calibration[2];<br>
>> +                                    if (callback && (parser->calibrated & 0x04)) callback (DC_SAMPLE_PPO2, sample, userdata);<br>
>> +                            }<br>
>>                      }<br>
>> <br>
>>                      // Setpoint<br>
>> -- <br>
>> 2.17.1<br>
>> <br>
> <br>
>>> From f7fef628697a84d5ff89a455a68844209daaec0a Mon Sep 17 00:00:00 2001<br>
>> From: Anton Lundin <<a href="mailto:glance@acc.umu.se" target="_blank" rel="noreferrer">glance@acc.umu.se</a>><br>
>> Date: Wed, 20 Jun 2018 20:12:03 +0200<br>
>> Subject: [PATCH 2/2] shearwater: Emit a string saying the source of ppo2<br>
>> values<br>
>> <br>
>> Signed-off-by: Anton Lundin <<a href="mailto:glance@acc.umu.se" target="_blank" rel="noreferrer">glance@acc.umu.se</a>><br>
>> ---<br>
>> src/shearwater_predator_parser.c | 4 ++++<br>
>> 1 file changed, 4 insertions(+)<br>
>> <br>
>> diff --git a/src/shearwater_predator_parser.c b/src/shearwater_predator_parser.c<br>
>> index 6b1ae43..3e17e19 100644<br>
>> --- a/src/shearwater_predator_parser.c<br>
>> +++ b/src/shearwater_predator_parser.c<br>
>> @@ -502,8 +502,12 @@ shearwater_predator_parser_cache (shearwater_predator_parser_t *parser)<br>
>>              // uncalibrated).<br>
>>              WARNING (abstract->context, "Disabled all O2 sensors due to a default calibration value.");<br>
>>              parser->calibrated = 0;<br>
>> +            if (mode != DC_DIVEMODE_OC)<br>
>> +                    add_string(parser, "PPO2 values are voted/averaged");<br>
>>      } else {<br>
>>              parser->calibrated = data[86];<br>
>> +            if (mode != DC_DIVEMODE_OC)<br>
>> +                    add_string(parser, "PPO2 values are from cells");<br>
>>      }<br>
>> <br>
>>      // Cache the data for later use.<br>
>> -- <br>
>> 2.17.1<br>
>> <br>
> <br>
>> _______________________________________________<br>
>> subsurface mailing list<br>
>> <a href="mailto:subsurface@subsurface-divelog.org" target="_blank" rel="noreferrer">subsurface@subsurface-divelog.org</a><br>
>> <a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
> <br>
> <br>
> -- <br>
> Anton Lundin  +46702-161604<br>
<br>
_______________________________________________<br>
subsurface mailing list<br>
<a href="mailto:subsurface@subsurface-divelog.org" target="_blank" rel="noreferrer">subsurface@subsurface-divelog.org</a><br>
<a href="http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface" rel="noreferrer noreferrer" target="_blank">http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface</a><br>
</blockquote></div></div></div>