[PATCH] Fix mod/end/ead calculations
Anton Lundin
glance at acc.umu.se
Tue Nov 12 14:12:56 UTC 2013
This patch was never merged, and is now obsoleted by "Break up
calculate_deco_information", which solves this in a better way.
//Anton
On 31 October, 2013 - Anton Lundin wrote:
> When ceiling calculations where turned off we also disabled calculations
> of mod/end/ead and so on. This just disables the deco calculations when
> ceiling calculations is turned off.
>
> Signed-off-by: Anton Lundin <glance at acc.umu.se>
> ---
> profile.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/profile.c b/profile.c
> index 1f90ffc..0b87531 100644
> --- a/profile.c
> +++ b/profile.c
> @@ -993,6 +993,10 @@ static void calculate_deco_information(struct dive *dive, struct divecomputer *d
> if (entry->pn2 > pi->maxpp && prefs.pp_graphs.pn2)
> pi->maxpp = entry->pn2;
>
> + /* If were not intrested in calculating celing skip that */
> + if (!prefs.profile_calc_ceiling)
> + continue;
> +
> /* and now let's try to do some deco calculations */
> t0 = (entry - 1)->sec;
> t1 = entry->sec;
> @@ -1132,8 +1136,7 @@ struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, s
> calculate_sac(dive, pi);
>
> /* Then, calculate partial pressures and deco information */
> - if (prefs.profile_calc_ceiling)
> - calculate_deco_information(dive, dc, pi);
> + calculate_deco_information(dive, dc, pi);
>
> pi->meandepth = dive->dc.meandepth.mm;
>
> --
> 1.8.3.2
--
Anton Lundin +46702-161604
More information about the subsurface
mailing list