Make planner work again for CCR dives

Robert Helling helling at
Fri Oct 17 03:01:37 PDT 2014

On 16.10.2014, at 21:55, Dirk Hohndel <dirk at> wrote:

> On Thu, Oct 16, 2014 at 05:28:42PM +0200, Robert Helling wrote:
>> Hi,
>> the latest CCR patches had rendered the planner not usable for CCR
>> dives. This patch corrects this (and reenables the CCR set point column
>> for segments). The problem was that a new member setpoint of struct
>> divepoint had been introduced, but there was already po2 which had the
>> same meaning. This patch merges the two and renames them setpoint to
>> prevent future confusion.
> I'm a bit nervous that it doesn't apply to latest master.
> Do you have other code in your tree that isn't upstream?


sorry, this was a mess (and I also didn’t realize that to amend a commit you have to add the additional files
so a lot was missing). Here is now a diff to current origin/master.

I would like to draw your attention to one additional hunk: 

@@ -1134,8 +1134,8 @@ void DivePlannerPointsModel::createTemporaryPlan()

where I did

-                               dp->next = diveplan.dp->next;
-                               diveplan.dp->next = dp;
+                               dp->next = diveplan.dp;
+                               diveplan.dp = dp;

This should have nothing to do with the CCR planning but it seems to me that without this change the logic of that function is broken. As it does not place the new cylinder dive point at the first position of the list (and since that has time = 0 the list is not ordered in time any more) I am a bit surprised this was not noticed before so this change might be wrong. Please double check!


Robert C. Helling     Elite Master Course Theoretical and Mathematical Physics
                      Scientific Coordinator
                      Ludwig Maximilians Universitaet Muenchen, Dept. Physik
                      Phone: +49 89 2180-4523  Theresienstr. 39, rm. B339

Enhance your privacy, use cryptography! My PGP keys have fingerprints
A9D1 A01D 13A5 31FA 6515  BB44 0820 367C 36BC 0C1D    and
DCED 37B6 251C 7861 270D  5613 95C7 9D32 9A8D 9B8F

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <>

More information about the subsurface mailing list