diff options
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index adf555a7c..64fb1c6da 100644 --- a/uemis-downloader.c +++ b/uemis-downloader.c @@ -814,6 +814,13 @@ static bool process_raw_buffer(device_data_t *devdata, uint32_t deviceid, char * return true; } +static int max_diveid_from_dialog; + +void uemis_set_max_diveid_from_dialog(int diveid) +{ + max_diveid_from_dialog = diveid; +} + static char *uemis_get_divenr(char *deviceidstr) { uint32_t deviceid, maxdiveid = 0; @@ -831,7 +838,7 @@ static char *uemis_get_divenr(char *deviceidstr) maxdiveid = dc->diveid; } } - snprintf(divenr, 10, "%d", maxdiveid); + snprintf(divenr, 10, "%d", maxdiveid > max_diveid_from_dialog ? maxdiveid : max_diveid_from_dialog); return strdup(divenr); } |