Add the ability to cache our deco state

We kept reduing all the deco calculations, including the previous dives
(if any) for each segment we add to the dive plan. This simply remembers
the last stage and then just adds to that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-01-06 11:13:46 -08:00
parent c607f09f40
commit c8830ffe48
3 changed files with 60 additions and 8 deletions

2
dive.h
View file

@ -577,6 +577,8 @@ extern void clear_deco(double surface_pressure);
extern void dump_tissues(void);
extern unsigned int deco_allowed_depth(double tissues_tolerance, double surface_pressure, struct dive *dive, gboolean smooth);
extern void set_gf(double gflow, double gfhigh);
extern void cache_deco_state(double, char **datap);
extern double restore_deco_state(char *data);
struct divedatapoint {
int time;