summaryrefslogtreecommitdiffstats
path: root/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'planner.c')
-rw-r--r--planner.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/planner.c b/planner.c
index 2cc47258c..405b07e02 100644
--- a/planner.c
+++ b/planner.c
@@ -49,6 +49,20 @@ void dump_plan(struct diveplan *diveplan)
}
#endif
+bool diveplan_empty(struct diveplan *diveplan)
+{
+ struct divedatapoint *dp;
+ if (!diveplan || !diveplan->dp)
+ return true;
+ dp = diveplan->dp;
+ while(dp) {
+ if (dp->time)
+ return false;
+ dp = dp->next;
+ }
+ return true;
+}
+
void set_last_stop(bool last_stop_6m)
{
if (last_stop_6m == true)