summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/dive.c b/dive.c
index 48fd020ef..4a9766483 100644
--- a/dive.c
+++ b/dive.c
@@ -199,6 +199,21 @@ double get_weight_units(unsigned int grams, int *frac, const char **units)
return value;
}
+bool has_hr_data(struct divecomputer *dc)
+{
+ int i;
+ struct sample *sample;
+
+ if (!dc)
+ return false;
+
+ sample = dc->sample;
+ for (i = 0; i < dc->samples; i++)
+ if (sample[i].heartbeat)
+ return true;
+ return false;
+}
+
struct dive *alloc_dive(void)
{
struct dive *dive;
@@ -2202,4 +2217,4 @@ void set_userid(char *rUserId)
if (prefs.userid && rUserId)
strcpy(prefs.userid, rUserId);
}
-#undef MAX_USERID_SIZE \ No newline at end of file
+#undef MAX_USERID_SIZE