Good morning,

On 20 Sep 2015, at 07:29, Dirk Hohndel <[email protected]> wrote:

Robert, any comment on this?

just got out of bed, before the first coffee. This patch prevents the deco calculation (which takes a lot of time) but of course does not help with the original problem. Hope to have some time for that later.

Best
Robert

From 22290842927a1e1c716f4dc86f88fcde4e03c232 Mon Sep 17 00:00:00 2001
From: "Robert C. Helling" <[email protected]>
Date: Sun, 20 Sep 2015 07:52:14 +0200
Subject: [PATCH] Only calculate crushing pressure in VPM-B mode

Don't do this expensive calculation when not needed.

Signed-off-by: Robert C. Helling <[email protected]>
---
 deco.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/deco.c b/deco.c
index ec4501b..39a6b34 100644
--- a/deco.c
+++ b/deco.c
@@ -511,7 +511,8 @@ void add_segment(double pressure, const struct gasmix 
*gasmix, int period_in_sec
                tissue_n2_sat[ci] += n2_satmult * pn2_oversat * n2_f;
                tissue_he_sat[ci] += he_satmult * phe_oversat * he_f;
        }
-       calc_crushing_pressure(pressure);
+       if(prefs.deco_mode == VPMB && in_planner())
+               calc_crushing_pressure(pressure);
        return;
 }
 
-- 
1.9.5 (Apple Git-50.3)

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to