diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2013-10-14 17:24:25 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-10-14 17:24:25 -0700 |
commit | 640f2067d5dcc99064734951cce7f5d86e020781 (patch) | |
tree | 1ef6573d0712d1fdcd75ce7168524971b1471c75 /profile.c | |
parent | 786110313920c3e42a348b8e92f0808b9a7a4529 (diff) | |
download | subsurface-640f2067d5dcc99064734951cce7f5d86e020781.tar.gz |
Only calculate decompression if the user turned the preference on
There's no point in wasting the cycles otherwise.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'profile.c')
-rw-r--r-- | profile.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1086,7 +1086,8 @@ struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, s pi = &gc->pi; /* reset deco information to start the calculation */ - init_decompression(dive); + if (prefs.profile_calc_ceiling) + init_decompression(dive); /* Create the new plot data */ if (last_pi_entry) @@ -1103,7 +1104,9 @@ struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, s populate_pressure_information(dive, dc, pi); /* Then, calculate partial pressures and deco information */ - calculate_deco_information(dive, dc, pi); + if (prefs.profile_calc_ceiling) + calculate_deco_information(dive, dc, pi); + pi->meandepth = dive->dc.meandepth.mm; if (0) /* awesome for debugging - not useful otherwise */ |