aboutsummaryrefslogtreecommitdiffstats
path: root/core/statistics.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/statistics.c')
-rw-r--r--core/statistics.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/statistics.c b/core/statistics.c
index 678843b99..eed24505c 100644
--- a/core/statistics.c
+++ b/core/statistics.c
@@ -345,6 +345,19 @@ bool is_cylinder_used(struct dive *dive, int idx)
return false;
}
+bool is_cylinder_prot(struct dive *dive, int idx)
+{
+ struct divecomputer *dc;
+ if (cylinder_none(&dive->cylinder[idx]))
+ return false;
+
+ for_each_dc(dive, dc) {
+ if (has_gaschange_event(dive, dc, idx))
+ return true;
+ }
+ return false;
+}
+
void get_gas_used(struct dive *dive, volume_t gases[MAX_CYLINDERS])
{
int idx;