summaryrefslogtreecommitdiffstats
path: root/profile.c
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2013-05-04 19:36:40 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-04 19:55:16 -0700
commitf269f8649644c5726fcd79ead443b0bb605a798d (patch)
treed6d7e99408a9d3f96f4277b1f6dca3af70eb443e /profile.c
parent19048b98e59aedb4d03490095c646d337d47e38b (diff)
downloadsubsurface-f269f8649644c5726fcd79ead443b0bb605a798d.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.c')
-rw-r--r--profile.c27
1 files changed, 2 insertions, 25 deletions
diff --git a/profile.c b/profile.c
index be6efa1e6..161415e88 100644
--- a/profile.c
+++ b/profile.c
@@ -11,6 +11,7 @@
#endif
#include "divelist.h"
+#include "profile.h"
#include "libdivecomputer/parser.h"
#include "libdivecomputer/version.h"
@@ -24,31 +25,7 @@ static struct plot_data *last_pi_entry = NULL;
#define cairo_set_line_width_scaled(cr, w) \
cairo_set_line_width((cr), (w) * plot_scale);
-typedef enum { STABLE, SLOW, MODERATE, FAST, CRAZY } velocity_t;
-
-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];
-};
+
#define SENSOR_PR 0
#define INTERPOLATED_PR 1