summaryrefslogtreecommitdiffstats
path: root/uemis.c
diff options
context:
space:
mode:
Diffstat (limited to 'uemis.c')
-rw-r--r--uemis.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/uemis.c b/uemis.c
index e60e94a00..1c592832a 100644
--- a/uemis.c
+++ b/uemis.c
@@ -155,6 +155,18 @@ void uemis_mark_divelocation(int diveid, int divespot, uint32_t dive_site_uuid)
hp->dive_site_uuid = dive_site_uuid;
}
+/* support finding a dive spot based on the diveid */
+int uemis_get_divespot_id_by_diveid(uint32_t diveid)
+{
+ struct uemis_helper *hp = uemis_helper;
+ while(hp) {
+ if (hp->diveid == diveid)
+ return hp->divespot;
+ hp = hp->next;
+ }
+ return 0;
+}
+
void uemis_set_divelocation(int divespot, char *text, double longitude, double latitude)
{
struct uemis_helper *hp = uemis_helper;