summaryrefslogtreecommitdiffstats
path: root/core/planner.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/planner.c')
-rw-r--r--core/planner.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/core/planner.c b/core/planner.c
index 614634f20..fdda64940 100644
--- a/core/planner.c
+++ b/core/planner.c
@@ -15,6 +15,7 @@
#include "gettext.h"
#include "libdivecomputer/parser.h"
#include "qthelperfromc.h"
+#include "version.h"
#define TIMESTEP 2 /* second */
#define DECOTIMESTEP 60 /* seconds. Unit of deco stop times */
@@ -67,6 +68,9 @@ void dump_plan(struct diveplan *diveplan)
}
#endif
+/* this is in qthelper.cpp, so including the .h file is a pain */
+extern const char *get_current_date();
+
bool diveplan_empty(struct diveplan *diveplan)
{
struct divedatapoint *dp;
@@ -837,11 +841,14 @@ static void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool
const char *depth_unit;
int altitude = (int) get_depth_units((int) (log(1013.0 / diveplan->surface_pressure) * 7800000), NULL, &depth_unit);
- len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "ATM pressure: %dmbar (%d%s)<br></div>"),
+ len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "ATM pressure: %dmbar (%d%s)<br>"),
diveplan->surface_pressure,
altitude,
depth_unit);
+ len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Plan creation date and version: %s, %s<br></div>"),
+ get_current_date(), subsurface_canonical_version());
+
/* Get SAC values and units for printing it in gas consumption */
double bottomsacvalue, decosacvalue;
int sacdecimals;