mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
Include DC information on Cobalt import
Note that I use the serial number as device ID as is done with the Suunto DM5 import. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
f9cb443c73
commit
0f6f1c7ccf
1 changed files with 9 additions and 2 deletions
11
parse-xml.c
11
parse-xml.c
|
@ -2665,13 +2665,20 @@ extern int cobalt_dive(void *param, int columns, char **data, char **column)
|
|||
*/
|
||||
settings_start();
|
||||
dc_settings_start();
|
||||
if (data[9])
|
||||
if (data[9]) {
|
||||
utf8_string(data[9], &cur_settings.dc.serial_nr);
|
||||
cur_settings.dc.deviceid = atoi(data[9]);
|
||||
cur_settings.dc.model = strdup("Cobalt import");
|
||||
}
|
||||
|
||||
cur_settings.dc.deviceid = 0xffffffff;
|
||||
dc_settings_end();
|
||||
settings_end();
|
||||
|
||||
if (data[9]) {
|
||||
cur_dive->dc.deviceid = atoi(data[9]);
|
||||
cur_dive->dc.model = strdup("Cobalt import");
|
||||
}
|
||||
|
||||
snprintf(get_buffer, sizeof(get_buffer) - 1, get_cylinder_template, cur_dive->number);
|
||||
retval = sqlite3_exec(handle, get_buffer, &cobalt_cylinders, 0, &err);
|
||||
if (retval != SQLITE_OK) {
|
||||
|
|
Loading…
Add table
Reference in a new issue