summaryrefslogtreecommitdiffstats
path: root/core/profile.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/profile.h')
-rw-r--r--core/profile.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/core/profile.h b/core/profile.h
index 42af6a845..988736f30 100644
--- a/core/profile.h
+++ b/core/profile.h
@@ -21,7 +21,7 @@ struct divecomputer;
struct plot_info;
struct plot_data {
unsigned int in_deco : 1;
- int cylinderindex;
+ char sensor[2];
int sec;
/* pressure[0] is main sensor pressure (diluent for CCR)
* pressure[1] is secondary sensor pressure (O2 for CCR)
@@ -98,13 +98,9 @@ int get_maxdepth(struct plot_info *pi);
#define SENSOR_PR 0
#define INTERPOLATED_PR 1
-#define SENSOR_PRESSURE(_entry) (_entry)->pressure[0][SENSOR_PR]
-#define O2CYLINDER_PRESSURE(_entry) (_entry)->pressure[1][SENSOR_PR]
-#define CYLINDER_PRESSURE(_o2, _entry) (_o2 ? O2CYLINDER_PRESSURE(_entry) : SENSOR_PRESSURE(_entry))
-#define INTERPOLATED_PRESSURE(_entry) (_entry)->pressure[0][INTERPOLATED_PR]
-#define INTERPOLATED_O2CYLINDER_PRESSURE(_entry) (_entry)->pressure[1][INTERPOLATED_PR]
-#define GET_PRESSURE(_entry) (SENSOR_PRESSURE(_entry) ? SENSOR_PRESSURE(_entry) : INTERPOLATED_PRESSURE(_entry))
-#define GET_O2CYLINDER_PRESSURE(_entry) (O2CYLINDER_PRESSURE(_entry) ? O2CYLINDER_PRESSURE(_entry) : INTERPOLATED_O2CYLINDER_PRESSURE(_entry))
+#define SENSOR_PRESSURE(_entry,_idx) (_entry)->pressure[_idx][SENSOR_PR]
+#define INTERPOLATED_PRESSURE(_entry,_idx) (_entry)->pressure[_idx][INTERPOLATED_PR]
+#define GET_PRESSURE(_entry,_idx) (SENSOR_PRESSURE(_entry,_idx) ? SENSOR_PRESSURE(_entry,_idx) : INTERPOLATED_PRESSURE(_entry,_idx))
#define SAC_WINDOW 45 /* sliding window in seconds for current SAC calculation */
#ifdef __cplusplus