summaryrefslogtreecommitdiffstats
path: root/profile.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-04 19:36:40 -0300
committerGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-04 19:36:40 -0300
commit09597cd2d8729ab368f2e423dbb1ef5235745f58 (patch)
treeac14919e187f12904fc4feeeefc0a408bbedd241 /profile.h
parent1b1ea35fac63ef7a6909f28e92bc2b4c24c2b7f4 (diff)
downloadsubsurface-09597cd2d8729ab368f2e423dbb1ef5235745f58.tar.gz
Plot of the Mean Deph
The mean depth now is plotted correctly. I wanted to do more stuff on this commit, but since it required that a few things on profile.c got moved to profile.h, commited to not have a huge blob for review. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Diffstat (limited to 'profile.h')
-rw-r--r--profile.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/profile.h b/profile.h
index 1ad6625db..2c293fa7d 100644
--- a/profile.h
+++ b/profile.h
@@ -11,10 +11,36 @@ typedef int bool;
#endif
#endif
-struct dive;
+#include "dive.h"
+
+typedef enum { STABLE, SLOW, MODERATE, FAST, CRAZY } velocity_t;
+
struct divecomputer;
struct graphics_context;
struct plot_info;
+struct plot_data {
+ unsigned int in_deco:1;
+ unsigned int cylinderindex;
+ int sec;
+ /* pressure[0] is sensor pressure
+ * pressure[1] is interpolated pressure */
+ int pressure[2];
+ int temperature;
+ /* Depth info */
+ int depth;
+ int ceiling;
+ int ndl;
+ int stoptime;
+ int stopdepth;
+ int cns;
+ int smoothed;
+ double po2, pn2, phe;
+ double mod, ead, end, eadd;
+ velocity_t velocity;
+ struct plot_data *min[3];
+ struct plot_data *max[3];
+ int avg[3];
+};
void calculate_max_limits(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);
struct plot_info *create_plot_info(struct dive *dive, struct divecomputer *dc, struct graphics_context *gc);