Discussion:
Tank pressure line color
tormento
2018-09-10 14:36:40 UTC
Permalink
I have just noticed that since a certain dive on, the tank pressure line
color that previously had different shades of green to red according to
pressure gradient, became plain grey.

I have a G2 computer.

Any idea?
Linus Torvalds
2018-09-10 15:07:20 UTC
Permalink
I have just noticed that since a certain dive on, the tank pressure line color that previously had different shades of green to red according to pressure gradient, became plain grey.
This is almost always because you haven't filled the tank size details.

The pressure line is colored by SAC rate, and to get the SAC rate we
need to know the tank size. With an unknown tank size we just make it
gray.

And yes, it's a bit silly, because the actual pressure color doesn't
really depend on *absolute* SAC rate, but on relative one, and so it
gets the same color regardless of what the tank size actually is. But
since it's the same code that also calculates the actual SAC rate that
we report textually, the code wants the actual real tank size..

Another reason for a lack of SAC-rate (and a gray line) is if you have
several gas cylinders, and subsurface can't figure out when each
cylinder is used. At that point, subsurface simply doesn't know *when*
you were breathing some cylinder, so it can't give that momentary
SAC-rate.

Linus
tormento
2018-09-10 15:50:08 UTC
Permalink
Dear Linus,

I always supply the tank size after importing my dive log. Until my
Extended Range course (soon, I hope), I am and I will be using a "single"
tank (twin included).

Alberto

P.S: sorry if double message. I replied directly to you and not to list.

Il giorno lun 10 set 2018 alle ore 17:07 Linus Torvalds <
Post by tormento
Post by tormento
I have just noticed that since a certain dive on, the tank pressure line
color that previously had different shades of green to red according to
pressure gradient, became plain grey.
This is almost always because you haven't filled the tank size details.
The pressure line is colored by SAC rate, and to get the SAC rate we
need to know the tank size. With an unknown tank size we just make it
gray.
And yes, it's a bit silly, because the actual pressure color doesn't
really depend on *absolute* SAC rate, but on relative one, and so it
gets the same color regardless of what the tank size actually is. But
since it's the same code that also calculates the actual SAC rate that
we report textually, the code wants the actual real tank size..
Another reason for a lack of SAC-rate (and a gray line) is if you have
several gas cylinders, and subsurface can't figure out when each
cylinder is used. At that point, subsurface simply doesn't know *when*
you were breathing some cylinder, so it can't give that momentary
SAC-rate.
Linus
Miika Turkia
2018-09-10 15:17:15 UTC
Permalink
Post by tormento
I have just noticed that since a certain dive on, the tank pressure line
color that previously had different shades of green to red according to
pressure gradient, became plain grey.
A new bug introduced in commit 5c4569247a31cf9f52238bd2b3f9c87b8f79933a, or
the previous one. The previous one just crashes on me so cannot be sure.
The code just is not within my comfort zone, so hopefully someone else will
fix it.

miika
Dirk Hohndel
2018-09-10 15:53:07 UTC
Permalink
I have just noticed that since a certain dive on, the tank pressure line color that previously had different shades of green to red according to pressure gradient, became plain grey.
A new bug introduced in commit 5c4569247a31cf9f52238bd2b3f9c87b8f79933a, or the previous one. The previous one just crashes on me so cannot be sure. The code just is not within my comfort zone, so hopefully someone else will fix it.
Berthold,

Would you like to take a look? That's your code :-)

/D
Berthold Stoeger
2018-09-10 16:15:25 UTC
Permalink
Post by Dirk Hohndel
certain dive on, the tank pressure line color that previously had
different shades of green to red according to pressure gradient, became
plain grey.
A new bug introduced in commit 5c4569247a31cf9f52238bd2b3f9c87b8f79933a,
or the previous one. The previous one just crashes on me so cannot be
sure. The code just is not within my comfort zone, so hopefully someone
else will fix it.
Berthold,
Would you like to take a look? That's your code :-)
Will do later today. I can reproduce, so shouldn't be too hard to fix.
Berthold Stoeger
2018-09-10 16:26:17 UTC
Permalink
Post by Berthold Stoeger
Post by Dirk Hohndel
certain dive on, the tank pressure line color that previously had
different shades of green to red according to pressure gradient, became
plain grey.
A new bug introduced in commit 5c4569247a31cf9f52238bd2b3f9c87b8f79933a,
or the previous one. The previous one just crashes on me so cannot be
sure. The code just is not within my comfort zone, so hopefully someone
else will fix it.
Berthold,
Would you like to take a look? That's your code :-)
Will do later today. I can reproduce, so shouldn't be too hard to fix.
PS: It seems like it's the air-dives that are affected, whereas others are
not..
Berthold Stoeger
2018-09-10 18:57:31 UTC
Permalink
Post by Dirk Hohndel
certain dive on, the tank pressure line color that previously had
different shades of green to red according to pressure gradient, became
plain grey.
A new bug introduced in commit 5c4569247a31cf9f52238bd2b3f9c87b8f79933a,
or the previous one. The previous one just crashes on me so cannot be
sure. The code just is not within my comfort zone, so hopefully someone
else will fix it.
Berthold,
Would you like to take a look? That's your code :-)
Posted a PR: https://github.com/Subsurface-divelog/subsurface/pull/1664
tormento
2018-09-11 14:44:57 UTC
Permalink
Just found that the mobile version on IOS shows line color correctly.

Il giorno lun 10 set 2018 alle 20:57 Berthold Stoeger <
Post by Berthold Stoeger
Posted a PR: https://github.com/Subsurface-divelog/subsurface/pull/1664
Loading...