diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-01-05 12:56:45 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-01-05 15:51:57 -0800 |
commit | 92a8fde9c256d80eaab9af448819594da00612ab (patch) | |
tree | 6aeba7fa7cc8189aeae46c7939d138d00ffa44fc /dive.h | |
parent | f31b8368367346277d25e7dc28b0879749da0d95 (diff) | |
download | subsurface-92a8fde9c256d80eaab9af448819594da00612ab.tar.gz |
Do a minimal hook-up of the dive plan tree view to the
actual planning
Yes, you can actually enter your segments now.
No, it's not wonderfully user-friendly. If you don't enter enough
segments to create a dive plan, it will just silently fail, for example.
And the <tab> key that should get you to the next editable segment
doesn't. And so on. But it kind of works.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.h')
-rw-r--r-- | dive.h | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -578,7 +578,23 @@ 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); +struct divedatapoint { + int time; + int depth; + int o2; + int he; + struct divedatapoint *next; +}; + +struct diveplan { + timestamp_t when; + int surface_pressure; + struct divedatapoint *dp; +}; + extern void test_planner(void); +void plan(struct diveplan *diveplan); +void plan_add_segment(struct diveplan *diveplan, int duration, int depth, int o2, int he); #ifdef DEBUGFILE extern char *debugfilename; |