Problem with idive tech+ and deco

89 views
Skip to first unread message

deeptripit

unread,
Feb 18, 2020, 6:26:41 AM2/18/20
to Subsurface Divelog
When posting questions you can help us answer you more quickly if you make sure you include some basic information:
  • Which version are you using (hint: look at the About screen)?     4.9.3
  • Which OS are you running?                                    windows 10 1903
  • (if applicable) which dive computer are you using?    ratio  idive tech+
 In dive with deco , at the end of deco the suburface show deco 1 min @ 6 mt until the end thowgh the deco is terminated from few minutes ...

JB2Cool

unread,
Feb 18, 2020, 7:59:55 AM2/18/20
to Subsurface Divelog
I'm making some assumptions here so sorry if I'm incorrect but what I think is likely happening is that you are looking at the subsurface calculated deco (green box) whereas the text is telling you what the dive computer reported deco is, these are sometimes different depending on the settings within Subsurface and on your dive computer. Can you try turning on 'toggle DC reported ceiling' (this should be the 4th icon down) and see if that helps to clear this up.

I can show an example in my log if that helps but this shows exactly what you describe.

Regards
Jason

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/0f75ff1e-2512-47f9-ad06-a3c4bda957a9%40googlegroups.com.

deeptripit

unread,
Feb 19, 2020, 2:09:48 AM2/19/20
to Subsurface Divelog
Thank you for reply but the situation doesn't change turning on 'toggle DC reported ceiling'

Regards
Igor

Il giorno martedì 18 febbraio 2020 13:59:55 UTC+1, JB2Cool ha scritto:
I'm making some assumptions here so sorry if I'm incorrect but what I think is likely happening is that you are looking at the subsurface calculated deco (green box) whereas the text is telling you what the dive computer reported deco is, these are sometimes different depending on the settings within Subsurface and on your dive computer. Can you try turning on 'toggle DC reported ceiling' (this should be the 4th icon down) and see if that helps to clear this up.

I can show an example in my log if that helps but this shows exactly what you describe.

Regards
Jason

On Tue, 18 Feb 2020 at 11:26, deeptripit <deept...@gmail.com> wrote:
When posting questions you can help us answer you more quickly if you make sure you include some basic information:
  • Which version are you using (hint: look at the About screen)?     4.9.3
  • Which OS are you running?                                    windows 10 1903
  • (if applicable) which dive computer are you using?    ratio  idive tech+
 In dive with deco , at the end of deco the suburface show deco 1 min @ 6 mt until the end thowgh the deco is terminated from few minutes ...

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

Jason Bramwell

unread,
Feb 19, 2020, 2:21:12 AM2/19/20
to subsurfac...@googlegroups.com
Is it possible to share a log that demonstrates this.

Jb

Sent from my iPhone

On 19 Feb 2020, at 07:09, deeptripit <deept...@gmail.com> wrote:


To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/ae7502bc-f9b1-459f-9ecd-7b2ddc868104%40googlegroups.com.

deeptripit

unread,
Feb 19, 2020, 2:26:30 AM2/19/20
to Subsurface Divelog
yes, but can you explain me how to make

igor

Jason Bramwell

unread,
Feb 19, 2020, 2:38:54 AM2/19/20
to subsurfac...@googlegroups.com
If you are using the desktop software:
File>Export

Choose Subsurface XML and Selected dives (I only want to see one).

Jb

Sent from my iPhone

On 19 Feb 2020, at 07:26, deeptripit <deept...@gmail.com> wrote:


To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/8c52d08f-ee3e-4701-b27f-7098ed81b8d2%40googlegroups.com.

Jason Bramwell

unread,
Feb 19, 2020, 3:02:04 AM2/19/20
to subsurfac...@googlegroups.com

Here is an example of one of my dives doing what I think yours is doing. Subsurface calculates that my deco is clear (when the green box disappears) at 67minutes but my dive computer is not reporting deco being clear (red box disappearing) till 69minutes 20seconds. If you were not viewing the DC reported ceiling you wouldn’t see this extra detail. Both subsurface and my dive computer OSTC Mk.2 were using the same gradient factors so it’s just the way the sample rate and algorithm works slightly differently on the different platforms.

 

As I said, I’ve made a bunch of assumptions thinking this is also the case for you but don’t know for sure till I see your log.

 

Would be useful to know what gradient factors you have Subsurface set to as well.

 

Jason

 

Sent from Mail for Windows 10





To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/ae7502bc-f9b1-459f-9ecd-7b2ddc868104%40googlegroups.com.

SMSColn.ssrf
SMSColn.JPG

deeptripit

unread,
Feb 19, 2020, 3:31:33 AM2/19/20
to Subsurface Divelog
This is my dive, i refer to the second computer (ratio idive tech+) because in the dive there's 2 computer but the first (galileo trimix luna) isn't correctly understand by subsurface ... if you see the deco (1 min @ 6 mt) stay until the end

the ratio idive tech+ (in this dive) as buhlmann 50/89
the subsurface have buhlmann 40/85 in preference





To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

prova.ssrf

Jason Bramwell

unread,
Feb 19, 2020, 3:56:32 AM2/19/20
to subsurfac...@googlegroups.com

This is the output of your dive as a screenshot and as you can see the dive computer reported deco runs to the end and never clears. If you look at your raw data compared to mine you see the deco decrease but never reached 0.

 

I don’t know if this is an Ratio iDive issue or how it’s being imported into Subsurface. I suspect Jef may want to see a memory dump from the computer.

 

Yours

  <sample time='40:30 min' depth='22.4 m' />

  <sample time='40:40 min' depth='22.3 m' />

  <sample time='40:50 min' depth='22.3 m' />

  <sample time='41:00 min' depth='22.2 m' />

  <sample time='41:10 min' depth='22.0 m' stoptime='1:30 min' stopdepth='9.0 m' />

  <sample time='41:20 min' depth='22.1 m' />

  <sample time='41:30 min' depth='22.2 m' />

  <sample time='41:40 min' depth='22.4 m' />

  <sample time='41:50 min' depth='22.5 m' />

  <sample time='42:00 min' depth='22.4 m' />

  <sample time='42:10 min' depth='22.2 m' />

  <sample time='42:20 min' depth='22.3 m' cns='15%' />

  <sample time='42:30 min' depth='22.4 m' />

  <sample time='42:40 min' depth='22.5 m' />

  <sample time='42:50 min' depth='22.7 m' stoptime='1:00 min' />

  <sample time='43:00 min' depth='22.7 m' />

  <sample time='43:10 min' depth='22.9 m' stoptime='0:30 min' />

  <sample time='43:20 min' depth='23.0 m' />

  <sample time='43:30 min' depth='23.1 m' />

  <sample time='43:40 min' depth='23.3 m' cns='16%' />

  <sample time='43:50 min' depth='22.8 m' />

  <sample time='44:00 min' depth='22.7 m' />

  <sample time='44:10 min' depth='22.6 m' />

  <sample time='44:20 min' depth='22.6 m' />

  <sample time='44:30 min' depth='22.3 m' cns='17%' />

  <sample time='44:40 min' depth='22.2 m' />

  <sample time='44:50 min' depth='22.2 m' />

  <sample time='45:00 min' depth='22.2 m' />

  <sample time='45:10 min' depth='21.9 m' />

  <sample time='45:20 min' depth='21.4 m' />

  <sample time='45:30 min' depth='20.9 m' cns='18%' />

  <sample time='45:40 min' depth='21.0 m' />

  <sample time='45:50 min' depth='21.1 m' />

  <sample time='46:00 min' depth='21.0 m' />

  <sample time='46:10 min' depth='20.8 m' />

  <sample time='46:20 min' depth='20.1 m' />

 

Mine

  <sample time='66:10 min' depth='6.158 m' />

  <sample time='66:20 min' depth='5.988 m' />

  <sample time='66:30 min' depth='6.048 m' />

  <sample time='66:40 min' depth='6.168 m' />

  <sample time='66:50 min' depth='6.178 m' />

  <sample time='67:00 min' depth='6.168 m' stoptime='2:00 min' />

  <sample time='67:10 min' depth='6.148 m' />

  <sample time='67:20 min' depth='6.128 m' />

  <sample time='67:30 min' depth='5.858 m' />

  <sample time='67:40 min' depth='5.598 m' />

  <sample time='67:50 min' depth='5.169 m' />

  <sample time='68:00 min' depth='5.149 m' stoptime='1:00 min' cns='42%' />

  <sample time='68:10 min' depth='4.879 m' />

  <sample time='68:20 min' depth='4.509 m' />

  <sample time='68:30 min' depth='4.029 m' />

  <sample time='68:40 min' depth='3.809 m' />

  <sample time='68:50 min' depth='3.509 m' />

  <sample time='69:00 min' depth='3.409 m' temp='11.4 C' ndl='240:00 min' in_deco='0' stopdepth='0.0 m' />

  <sample time='69:10 min' depth='3.199 m' />

  <sample time='69:20 min' depth='2.829 m' />

  <sample time='69:30 min' depth='2.569 m' />

 

Sent from Mail for Windows 10

 





To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/d811e82d-940b-49b8-848f-36cc13cd80ce%40googlegroups.com.

 

Capture.JPG

deeptripit

unread,
Feb 19, 2020, 5:05:19 AM2/19/20
to Subsurface Divelog
if Jef want to see a memory dump ... you must explain me how make :) thanks

ps: in divelogger 4.2 the result it's corect ... in attachment 2 situations

thanks





To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

divelogger1.JPG
divelogger.JPG

Jason Bramwell

unread,
Feb 19, 2020, 5:09:00 AM2/19/20
to subsurfac...@googlegroups.com

Just do the download like you usually would but check the box that says ‘save libdivecomputer dumpfile’, it’ll then ask you where to save the file.

 

JB





To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

 

--

You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/3a03220a-4023-457e-b685-1370ec946f21%40googlegroups.com.

 

divelogger1.JPG
divelogger.JPG

deeptripit .

unread,
Feb 19, 2020, 6:05:37 AM2/19/20
to subsurfac...@googlegroups.com
I tried but the file is not created ... i don't understand where i mistake

You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/EOhmLzT8MA0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/5e4d0937.1c69fb81.2e663.8ab4%40mx.google.com.

deeptripit

unread,
Feb 19, 2020, 6:29:15 AM2/19/20
to Subsurface Divelog
when i ceck the box "Save libdivecomputer..." subsurface reply with warning : Saving the libdivecomputer dump will NOT download dives to the dive list. ... and the file doesn't exist





To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/EOhmLzT8MA0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-divelog+unsub...@googlegroups.com.

Linus Torvalds

unread,
Feb 19, 2020, 11:52:22 AM2/19/20
to Subsurface Divelog, Jef Driesen
On Wed, Feb 19, 2020 at 3:29 AM deeptripit <deept...@gmail.com> wrote:
>
> when i ceck the box "Save libdivecomputer..." subsurface reply with warning : Saving the libdivecomputer dump will NOT download dives to the dive list. ... and the file doesn't exist

The Ratio dive computers don't create a memory dump.

Instead, check the "Force download all dives" checkbox, and the
checkbox with ask for a libdivecomputer logfile (not the dump).

Then do the download and just discard all the dives that you re-downloaded.

You should now have a log file that you can send to Jef.

It's probably something really simple, where for some reason
libdivecomputed just misses that the stoptime goes down to zero, and
doesn't create an event for it.

Jef added to the cc explicitly - he may realize what the problem is
even without a logfile.

Linus

Manuel Egea Alonso

unread,
Feb 19, 2020, 12:29:31 PM2/19/20
to Subsurface Divelog
I have the same issue with Ratio Ix3m gps tech+

Jef Driesen

unread,
Feb 19, 2020, 1:16:40 PM2/19/20
to Linus Torvalds, Subsurface Divelog
I think I know what is going wrong, but I need to check first. Unfortunately I
have a very busy agenda today and tomorrow, so that will be something for Friday.

Jef

deeptripit

unread,
Feb 20, 2020, 3:00:37 AM2/20/20
to Subsurface Divelog
This is the libdivecomputer logfile

Thanks
Igor
subsurface.log

Jef Driesen

unread,
Feb 21, 2020, 10:25:49 AM2/21/20
to Linus Torvalds, Subsurface Divelog
On 19/02/2020 19:14, Jef Driesen wrote:
> I think I know what is going wrong, but I need to check first. Unfortunately I
> have a very busy agenda today and tomorrow, so that will be something for Friday.

The problem is as follows. When the last deco stop is cleared, libdivecomputer
stops reporting deco/ndl samples. That's because the dive computer internally
switches back to ndl mode with an infinite tts, but ndl times are only reported
by libdivecomputer when they have a finite time. But subsurface seems to re-use
the last value from the previous sample for some reason. And because the
previous sample indicated a deco stop, the deco stop gets extended all the way
to the end of the dive.

Now I also realize I did already investigated this problem before:

https://github.com/Subsurface-divelog/subsurface/issues/1351

Jef

Linus Torvalds

unread,
Feb 21, 2020, 1:42:24 PM2/21/20
to Subsurface Divelog
On Fri, Feb 21, 2020 at 7:25 AM Jef Driesen <j...@libdivecomputer.org> wrote:
>
> The problem is as follows. When the last deco stop is cleared, libdivecomputer
> stops reporting deco/ndl samples. That's because the dive computer internally
> switches back to ndl mode with an infinite tts, but ndl times are only reported
> by libdivecomputer when they have a finite time.

That's clearly a libdivecomputer bug.

If

> But subsurface seems to re-use
> the last value from the previous sample for some reason.

What "some reason"?

OF COURSE subsurface re-uses the old value.

Because it doesn't _have_ a new value, because libdivecomputer didn't
give it a new DC_SAMPLE_DECO to show that the deco cleared.

If you don't have a NDL you want to give us, at least send a DECOSTOP
with a stopdepth of zero.

That way we know the deco has cleared, even if we don't know NDL.

Or just give us a big NDL value.

Just exactly how did you expect subsurface to otherwise know that the
divecomputer is no longer in deco?

We can't just say "last deco was 30 seconds ago, and back then you
said you had 30 seconds left". That would be insane. The deco times
depend on your depth and the exact algorithm of the dive computer, so
even if it said that it was about to end, that doesn't mean that it
really did.

So libdivecomputer really does have to say "I'm no longer in deco".

Subsurface accepts two ways to do that: either send a DC_DECO_NDL
sample (make up an NDL, including zero, although "99" minutes sounds
fine too), or DC_DECO_DECOSTOP with zero depth.

Linus

deeptripit

unread,
Feb 25, 2020, 3:07:59 AM2/25/20
to Subsurface Divelog
So , there is no solution?

Robert Helling

unread,
Feb 25, 2020, 3:22:18 AM2/25/20
to 'Robert C. Helling' via Subsurface Divelog


> On 25. Feb 2020, at 09:07, deeptripit <deept...@gmail.com> wrote:
>
> So , there is no solution?

I submitted a pull request yesterday, that should fix this problem. There should soon be a binary to test this:

https://github.com/Subsurface-divelog/subsurface/pull/2635

Best
Robert
signature.asc

deeptripit

unread,
Feb 25, 2020, 3:58:28 AM2/25/20
to Subsurface Divelog
Ok thanks, if you need a test with ratio computer, i have a idive ratio tech+ ...

Robert Helling

unread,
Feb 25, 2020, 6:17:20 AM2/25/20
to 'Robert C. Helling' via Subsurface Divelog
Hi,

> On 25. Feb 2020, at 09:58, deeptripit <deept...@gmail.com> wrote:
>
> Ok thanks, if you need a test with ratio computer, i have a idive ratio tech+ ...

you could try https://github.com/Subsurface-divelog/subsurface/suites/478126456/artifacts/2171929

Best
Robert
signature.asc

deeptripit .

unread,
Feb 25, 2020, 7:05:58 AM2/25/20
to subsurfac...@googlegroups.com
i've download it and installed subsurface-installer.exe (the version is :4.9.3-989-g34014335ddb3) , therefore i try to download dive from ratio idive tech+ but the result it's the same, see image ...

--
You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/EOhmLzT8MA0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CD5DA5A5-257B-4D05-8527-B7B254EF137B%40atdotde.de.
Cattura25.JPG

Jef Driesen

unread,
Feb 25, 2020, 7:18:57 AM2/25/20
to subsurfac...@googlegroups.com, Robert Helling
This won't fix the problem. Right now libdivecomputer stops reporting
deco/ndl samples once deco has cleared. So the ndl > 0 check in your
patch will never get triggered.

Also the tts value I mentioned is the internal value (as stored by the
dive computer in the raw data). Currently libdivecomputer doesn't report
a value of 0xFFFFFFFF to indicate an invalid (or infinite) time. Thus
also that part of the patch will not get triggered.

Jef

Jef Driesen

unread,
Feb 25, 2020, 7:28:47 AM2/25/20
to subsurfac...@googlegroups.com, Linus Torvalds
I agree that the current behavior isn't ideal. But re-using data from
previous samples isn't entirely correct either. Remember there are many
dive computers that only provide certain values every X samples. For all
those intermediate samples, the actual value is unknown. Libdivecomputer
can't give you a value, because it doesn't have one. Thus until you get
a new value, the value is unknown and should be treated as such. If
subsurface assumes the value remains unchanged until the next value
arrives, that's fine, but that's not something libdivecomputer can
guarantee.

Note that if a previous and next value is available, an interpolation
algorithm can give you a reasonable result for the missing value.
(Copying the value from the previous sample would be nearest neighbor
interpolation.) But if there is no next value you can't do a reliable
interpolation.

But yes, in this particular case, we do have some additional
information, and libdivecomputer should indeed pass that to the
application somehow. That would be more intuitive.

> Subsurface accepts two ways to do that: either send a DC_DECO_NDL
> sample (make up an NDL, including zero, although "99" minutes sounds
> fine too), or DC_DECO_DECOSTOP with zero depth.

Using DC_DECO_DECOSTOP with a zero depth to signal the end of deco is
not an option. The depth (and time) value is optional. Thus
DC_DECO_DECOSTOP with a zero depth value means the dive computer didn't
tell us the depth (or time). Several dive computers, especially the
older ones and the more basic models, simply don't provide that kind of
info. It just a simple deco/ndl flag.

Using some arbitrary value like 99 minutes could lead to some very
confusing results if the dive computer actually reports NDL values that
are greater than those 99 minutes (and the Ratio computers do that). A
zero NDL value means very close to deco, which is in fact the opposite
of the intended "infinite", so that's not a good value either.

So a better solution could be to introduce a magic value for infinite,
like 0xFFFFFFFF. The only downside of such a value is that if
applications are not updated, they will end up with a very large value.
Another options is that I ask Ratio what their threshold for infinite
is, and use that.

BTW, talking about the deco/ndl data. I would also like to extend the
deco structure with a tts field. Currently the deco.time field is either
tts or the duration of the next stop, depending on what the dive
computer provides (usually tts). It would be better to make this
difference explicit.

Jef

Robert Helling

unread,
Feb 25, 2020, 11:35:32 AM2/25/20
to 'Robert C. Helling' via Subsurface Divelog, Linus Torvalds
Jef,

thank you for your help.

> Am 25.02.2020 um 13:28 schrieb Jef Driesen <j...@libdivecomputer.org>:
>
> So a better solution could be to introduce a magic value for infinite, like 0xFFFFFFFF. The only downside of such a value is that if applications are not updated, they will end up with a very large value. Another options is that I ask Ratio what their threshold for infinite is, and use that.

I don’t see where would be the harm: an NDL value of several years is an absolutely valid replacement for infinity. I cannot see a situation where a program represents this in a wrong way. After all, you probably shouldn’t stay longer under water than the remaining validity of your medical test.

Best
Robert
signature.asc

Jef Driesen

unread,
Feb 26, 2020, 9:47:42 AM2/26/20
to subsurfac...@googlegroups.com, Linus Torvalds, Robert Helling
What I meant is that if the application simply displays the value as-is,
without translating it to something like "infinity", users will see a
very large value like 4294967295 seconds (0xFFFFFFFF). For normal users
that's a number that doesn't make sense, because it's way outside the
normal range. So there is a good chance it will be reported as a bug.

Anyway, I got some feedback from Ratio. The upper limit for NDL (0x4000)
is only a factor 2 or 4 smaller than the infinite value (0x7FFF for v4.x
and 0xFFFF for v3.x firmware). So instead of trying to handle those
infinite value, we can just pass through the value as-is. In that case
the user will see an NDL of 9.1 or 18.2 hours. The finite NDL values can
already reach up to 4.55 hours anyway.

Something like the attached patch.

Jef

Linus Torvalds

unread,
Feb 26, 2020, 12:50:22 PM2/26/20
to Jef Driesen, Subsurface Divelog, Robert Helling
On Wed, Feb 26, 2020 at 6:47 AM Jef Driesen <j...@libdivecomputer.org> wrote:
>
> Something like the attached patch.

There was nothing attached..

Linus

Jef Driesen

unread,
Feb 26, 2020, 1:32:28 PM2/26/20
to Linus Torvalds, Subsurface Divelog, Robert Helling
Now it should be there :-)

Jef
0001-Pass-infinite-NDL-values-to-the-application.patch

Linus Torvalds

unread,
Feb 26, 2020, 1:37:46 PM2/26/20
to Jef Driesen, Subsurface Divelog, Robert Helling
On Wed, Feb 26, 2020 at 10:32 AM Jef Driesen <j...@libdivecomputer.org> wrote:
>
> Now it should be there :-)

Ack. This looks like the right thing to me.

Thanks, I'll pick it up for subsurface when it's in your tree (maybe
it already is, I didn't check).

Linus

Linus Torvalds

unread,
Feb 26, 2020, 1:41:37 PM2/26/20
to Jef Driesen, Subsurface Divelog, Robert Helling
On Wed, Feb 26, 2020 at 10:37 AM Linus Torvalds
<torv...@linux-foundation.org> wrote:
>
> Thanks, I'll pick it up for subsurface when it's in your tree (maybe
> it already is, I didn't check).

Checked. It's not there yet, but I notice that Oceanic BLE handshake change.

I actually think that the right thing to do is to ignore the error
from oceanic_atom2_ble_handshake() rather than have a "don't do it for
Pro Plus X".

Or does trying that handshake then cause other problems on the Pro Plus X?

I'm not sure what the pattern is, but it might be something like "only
newer devices do it" or "only Scubapro devices do it".

Linus

Linus Torvalds

unread,
Feb 26, 2020, 1:44:50 PM2/26/20
to Jef Driesen, Subsurface Divelog, Robert Helling
On Wed, Feb 26, 2020 at 10:41 AM Linus Torvalds
<torv...@linux-foundation.org> wrote:
>
> I actually think that the right thing to do is to ignore the error
> from oceanic_atom2_ble_handshake() rather than have a "don't do it for
> Pro Plus X".

Oh, never mind. We already do ignore the error, unless the bluetooth
name is too short.

> Or does trying that handshake then cause other problems on the Pro Plus X?

So I guess it's actually causing some issues. Do you have a log for
the failure case, just out of curiosity?

Linus

Jef Driesen

unread,
Feb 26, 2020, 2:21:47 PM2/26/20
to Linus Torvalds, Subsurface Divelog, Robert Helling
On 26/02/2020 19:44, Linus Torvalds wrote:
> On Wed, Feb 26, 2020 at 10:41 AM Linus Torvalds
> <torv...@linux-foundation.org> wrote:
>>
>> I actually think that the right thing to do is to ignore the error
>> from oceanic_atom2_ble_handshake() rather than have a "don't do it for
>> Pro Plus X".
>
> Oh, never mind. We already do ignore the error, unless the bluetooth
> name is too short.

No, a failing handshake is considered a fatal error. That's why I excluded the
Pro Plus X. We only ignore errors retrieving the bluetooth name.

>> Or does trying that handshake then cause other problems on the Pro Plus X?
>
> So I guess it's actually causing some issues.

Good question. That's something I didn't try. I just noticed the command failed
with a NAK, and then we tried without the handshake command and that worked
fine. I'll ask the user to retry with a build that ignores the failure.

There appear to be different variants of the BLE communication. The handshake
command is probably something that was added in a later generation of the
protocol. That would explain why some devices need it and others don't.

The handshake isn't the only problem. Some devices, like the Pro Plus X and the
i770 sometimes answer the version command with one or more bytes too much. The
odd thing is that the checksum is correct, but the number of bytes and their
content is random. I'm still looking into that. This is not an isolated issue,
because Nick also reported this a while ago.

> Do you have a log for
> the failure case, just out of curiosity?

Log snippet from a failing handshake command:

INFO: Write: size=5, data=CD40000184
INFO: Read: size=20, data=CDE000105A4F4345414E4F435820314320303030
INFO: Read: size=6, data=CDC1000232C6
INFO: Ioctl: request=0x40006200 (dir=1, type=98, nr=0, size=0)
INFO: Ioctl read: size=9, data=455230303234343600
INFO: Sleep: value=1
INFO: Write: size=14, data=CD40010AE5000002040406000010
INFO: Read: size=5, data=CDC00101A5
ERROR: Unexpected answer start byte(s). [in oceanic_atom2.c:713
(oceanic_atom2_packet)]
INFO: Sleep: value=100
INFO: Purge: direction=1
INFO: Sleep: value=2
INFO: Write: size=14, data=CD40010AE5000002040406000010
INFO: Read: size=5, data=CDC00101A5
ERROR: Unexpected answer start byte(s). [in oceanic_atom2.c:713
(oceanic_atom2_packet)]
INFO: Sleep: value=100
INFO: Purge: direction=1
INFO: Sleep: value=3
INFO: Write: size=14, data=CD40010AE5000002040406000010
INFO: Read: size=5, data=CDC00101A5
ERROR: Unexpected answer start byte(s). [in oceanic_atom2.c:713
(oceanic_atom2_packet)]

The NAK byte (0xA5) could indeed indicate "I don't support this command",
although I'm not really sure about that.

Jef

Jef Driesen

unread,
Feb 26, 2020, 2:22:15 PM2/26/20
to Linus Torvalds, Subsurface Divelog, Robert Helling
No, it's not there yet. I still need to double check against my dataset, but I
don't expect any issues.

The only thing I'm not really sure about is whether we should also map the
different infinite values for the two firmware versions (0x7FFF for 4.x and
0xFFFF for 3.x) to the same value or just leave them as-is.

Jef

Linus Torvalds

unread,
Feb 26, 2020, 2:36:48 PM2/26/20
to Jef Driesen, Subsurface Divelog, Robert Helling
On Wed, Feb 26, 2020 at 11:22 AM Jef Driesen <j...@libdivecomputer.org> wrote:
>
> The only thing I'm not really sure about is whether we should also map the
> different infinite values for the two firmware versions (0x7FFF for 4.x and
> 0xFFFF for 3.x) to the same value or just leave them as-is.

I don't think it's a big deal.

A lot of dive computers seem to arbitrarily pick random values. 99 (at
least some Shearwater) and 100 (at least some Suunto) come to mind.

I'm not sure "infinite" is right either. It might not be infinite,
just "too long to care". I'm not sure you can always tell. Maybe "99
minutes" sometimes just happens to be the actual NDL, and maybe it
ends up benign the maximum.

So if you do pick some value for "very long NDL", we can certainly
special case that. Entirely up to you, but I don't think it's a huge
issue.

Linus

deeptripit .

unread,
Feb 27, 2020, 2:14:45 AM2/27/20
to subsurfac...@googlegroups.com
excuse me, may i use the patch in windows? how?

--
You received this message because you are subscribed to a topic in the Google Groups "Subsurface Divelog" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/subsurface-divelog/EOhmLzT8MA0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to subsurface-dive...@googlegroups.com.

Jason Bramwell

unread,
Feb 27, 2020, 2:24:46 AM2/27/20
to subsurfac...@googlegroups.com
No, the patch is a patch for the Subsurface source code, not for you to run. A new .exe will need to be compiled for you.

Jb

Sent from my iPhone

On 27 Feb 2020, at 07:14, deeptripit . <deept...@gmail.com> wrote:


You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/CADX2uPWOwjgzU7jsWKw16bY8KG85G2DLx3rp%2B1RKQUSfM1P8yQ%40mail.gmail.com.

Jef Driesen

unread,
Feb 27, 2020, 6:26:32 PM2/27/20
to Linus Torvalds, Subsurface Divelog, Robert Helling
The Ratio also limits the display to 99 minutes (because there isn't screen
space for more digits), but records the actual value if it's longer because
there is more space available. Other dive computers probably choose to also cut
off the stored data to match the displayed value.

Anyway, I have pushed the patch as-is. Subsurface shows the correct end of deco,
and an ndl of 547 minutes afterwards (and also at the start of the dive). Looks
all good to me.

Jef

Linus Torvalds

unread,
Feb 27, 2020, 7:34:12 PM2/27/20
to Jef Driesen, Dirk Hohndel, Subsurface Divelog, Robert Helling
On Thu, Feb 27, 2020 at 3:26 PM Jef Driesen <j...@libdivecomputer.org> wrote:
>
> Anyway, I have pushed the patch as-is. Subsurface shows the correct end of deco,
> and an ndl of 547 minutes afterwards (and also at the start of the dive). Looks
> all good to me.

Thanks, looks good, and I merged it into our branch.

Dirk, I have some kernel stuff I need to do, and then start packing
for my testing trip. Can you do the libdivecomputer update? Then
deeptripit should finally have something that gets the right events
and NDL.

Linus

deeptripit

unread,
Mar 3, 2020, 6:52:55 AM3/3/20
to Subsurface Divelog
Then? the solution with the next subsurface update ?

Dirk Hohndel

unread,
Mar 3, 2020, 2:23:10 PM3/3/20
to Subsurface Divelog
You can get a test build here:


These releases are rebuilt every time we update the master branch of our repo.
So when you check, there may be some builds missing. The Windows installer
should be a file named "subsurface-installer.exe". If it is missing when you
get around to try and download it, please drop me a line so I can make sure
that a new build is triggered.

Thanks

/D

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

deeptripit

unread,
Mar 4, 2020, 2:57:44 AM3/4/20
to Subsurface Divelog
ok!
I downloaded the file named "subsurface-installer.exe" and i install it, the new release is 4.9.3-1027-gbd1e0eea512b! If i download again dives from ratio idive, at the end of dive, over the deco, it's show ndl 547 min ... but the dives previusly downloaded stay incorrect!

Thanks
Igor
/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

Jason Bramwell

unread,
Mar 4, 2020, 3:53:16 AM3/4/20
to subsurfac...@googlegroups.com
So just to confirm the newly downloaded dive looks ok now? 

The older dives have already been parsed for events by libdivecomputer so it is expected that they would still look ‘bad’, I don’t think there is much that can be done about that.

Sent from my iPhone

On 4 Mar 2020, at 07:57, deeptripit <deept...@gmail.com> wrote:


To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/fb3d7615-e49a-4a81-b33c-98075eb179de%40googlegroups.com.

deeptripit

unread,
Mar 4, 2020, 4:08:08 AM3/4/20
to Subsurface Divelog
yes , new dives show ndl 547 min

deeptripit

unread,
Mar 4, 2020, 4:17:01 AM3/4/20
to Subsurface Divelog
but if I download again using the "Force download of all dives" function it will not work! That is, the dives must be completely new

JB2Cool

unread,
Mar 4, 2020, 4:29:49 AM3/4/20
to Subsurface Divelog
How many 'bad' dives do you have showing the incorrect behaviour? If it's just a few then it should be easy enough to go into the data and insert a deco clear entry. It you have lots of these dives then this could become a bit tedious.

Jason


/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/936284f9-fd66-4398-b86c-465e7d0d6b4a%40googlegroups.com.
prova.ssrf

Willem Ferguson

unread,
Mar 4, 2020, 4:52:22 AM3/4/20
to subsurfac...@googlegroups.com
On 2020/03/04 11:17, deeptripit wrote:
but if I download again using the "Force download of all dives" function it will not work! That is, the dives must be completely new


The Force Download All Dives option should provide all the dives as "new" dives. Did you download these dives into a new empty dive log? Alternatively you can erase all the faulty dives from your existing dive log and they should be replaced by the fresh dives from the download.

Kind regards,

willem



This message and attachments are subject to a disclaimer.
Please refer to http://upnet.up.ac.za/services/it/documentation/docs/004167.pdf 
for full details.

deeptripit

unread,
Mar 4, 2020, 4:54:15 AM3/4/20
to Subsurface Divelog
About 50 but if you explain how to do it ... I do it,

thanks
Igor

/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

Willem Ferguson

unread,
Mar 4, 2020, 5:06:42 AM3/4/20
to subsurfac...@googlegroups.com
On 2020/03/04 11:54, deeptripit wrote:
About 50 but if you explain how to do it ... I do it,

thanks
Igor


1) Highlight all the dives in your dive log that need to be replaced.

2) Right-click on one of the highlighted dives to get the dive list context menu

3) Select "Delete dives"

4) Download the dives from your dive computer.

You will lose all additional information that you typed into the log. There are are several ways of getting round this. I suggest you consult the user manual to understand these ways of doing this.

Kind regards,

willem


deeptripit

unread,
Mar 4, 2020, 5:55:40 AM3/4/20
to Subsurface Divelog
for points 1 to 4 I had imagined! but I have 2 computers (ratio and galileo trimix) I should only delete those of the ratio ...
by the way is there a way to see the deco on the galileo trimix in subsurface? because some time ago I had reported the problem ... but I don't think it has been seen anymore

JB2Cool

unread,
Mar 4, 2020, 6:47:00 AM3/4/20
to Subsurface Divelog
The way i edited the dive was to simply open the .ssrf in some kind of text editor (I used WordPad on Windows but nano on Linux would work too) and then scroll through to the point where you want the deco to end and edit the sample line from something like;

This
  <sample time='67:20 min' depth='6.3 m' />

To something like this
  <sample time='67:30 min' depth='6.3 m' ndl='240:00 min' in_deco='0' stopdepth='0.0 m' />

Save the file and you should see your deco end now. You'll need to repeat this for each dive that is showing this behaviour.

If you only save the file locally then this should be all you have to do, if you use the cloud storage though then you may have to do some funky workarounds like exporting the dive to .ssrf file, edit it, delete the dive drom your log and then reimport it from the edited .ssrf file.

This is just how i'd do it, this is not necessarily the 'correct' or 'best' way to do it.

Jason

JB


/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/0f953ef6-f1b4-47ef-b1c0-67b50676b52b%40googlegroups.com.

deeptripit

unread,
Mar 4, 2020, 8:32:30 AM3/4/20
to Subsurface Divelog
thanks but i use the *.xml file such as logbook ... it's possible edit that file with wordpad ?

/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

Linus Torvalds

unread,
Mar 4, 2020, 8:46:35 AM3/4/20
to Subsurface Divelog
Yes, you can just edit it by hand. Do a backup first in case you mess something up (get the xml format wrong or something).

(BTW, the ssrf and xml file format is the same, it's just a different name ending. If you use the cloud git save format it's different, but also something you can edit by hand)

       Linus

JB2Cool

unread,
Mar 4, 2020, 8:54:25 AM3/4/20
to Subsurface Divelog
Yep, exactly the same process as I prescribed,i was getting my filetypes mixed up.

Just take a backup copy before you start in case you break it.

JB 


/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/3a625b8b-8f64-47e6-93bb-f8e6d697abad%40googlegroups.com.

deeptripit

unread,
Mar 4, 2020, 8:58:56 AM3/4/20
to Subsurface Divelog
Thanks ,
yes, I tried and it works! I added 99 minutes as ndl! I only use the cloud to sync the mobile version on android

:)

/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

JB2Cool

unread,
Mar 4, 2020, 9:08:47 AM3/4/20
to Subsurface Divelog
Good to hear this worked for you. This is a way to fix your older dives, anything new downloaded should be handled correctly now that Jef has made some changes to libdivecomputer.

Jason


/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-dive...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/subsurface-divelog/96c541c2-1fa2-4800-b288-22cd227a0100%40googlegroups.com.

deeptripit

unread,
Mar 4, 2020, 9:38:31 AM3/4/20
to Subsurface Divelog
Thanks for support :)

/D

To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Subsurface Divelog" group.
To unsubscribe from this group and stop receiving emails from it, send an email to subsurface-divelog+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages