mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Uemis downloader: new routine to load divespots
Added load_uemis_divespot. This will be used later in do_uemis_import to improve the amount of divespots that must be loaded actually. Signed-off-by: glerch <guido.lerch@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
c0cbafdc93
commit
b4f9d2786d
1 changed files with 18 additions and 0 deletions
|
@ -1032,6 +1032,24 @@ static void do_delete_dives(struct dive_table *td, int idx)
|
|||
td->dives[x]->downloaded = false;
|
||||
}
|
||||
|
||||
static bool load_uemis_divespot(const char *mountpath, int divespot_id)
|
||||
{
|
||||
char divespotnr[10];
|
||||
snprintf(divespotnr, sizeof(divespotnr), "%d", divespot_id);
|
||||
param_buff[2] = divespotnr;
|
||||
#if UEMIS_DEBUG & 2
|
||||
fprintf(debugfile, "getDivespot %d\n", divespot_id);
|
||||
#endif
|
||||
bool success = uemis_get_answer(mountpath, "getDivespot", 3, 0, NULL);
|
||||
if (mbuf && success) {
|
||||
#if UEMIS_DEBUG & 2
|
||||
do_dump_buffer_to_file(mbuf, strdup("Spot"), round);
|
||||
#endif
|
||||
return parse_divespot(mbuf);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
const char *do_uemis_import(device_data_t *data)
|
||||
{
|
||||
const char *mountpath = data->devname;
|
||||
|
|
Loading…
Reference in a new issue