diff options
author | Anton Lundin <glance@acc.umu.se> | 2016-12-29 15:41:44 +0100 |
---|---|---|
committer | Subsurface <dirk@subsurface-divelog.org> | 2017-01-12 14:15:53 -0800 |
commit | 70e2404492bb6fd19bd865985e1622260e2d7e54 (patch) | |
tree | 99cb933c7b32742919a4c4feb3af19f3fb135b4a /core/libdivecomputer.c | |
parent | d11dfd2f45fbf0a036d3e2089ff86a0ada43f2e0 (diff) | |
download | subsurface-70e2404492bb6fd19bd865985e1622260e2d7e54.tar.gz |
Stop accessing the internals of dc_descriptor_t
This removes our own declaration of dc_descriptor_t and all our accesses
to its internals, and switches to use the libdivecomputer functions to
access those instead.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r-- | core/libdivecomputer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 5bdbb9e63..8a8b215e8 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1079,14 +1079,14 @@ dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned dc_status_t rc; dc_parser_t *parser = NULL; - switch (data->descriptor->type) { + switch (dc_descriptor_get_type(data->descriptor)) { case DC_FAMILY_UWATEC_ALADIN: case DC_FAMILY_UWATEC_MEMOMOUSE: rc = uwatec_memomouse_parser_create(&parser, data->context, 0, 0); break; case DC_FAMILY_UWATEC_SMART: case DC_FAMILY_UWATEC_MERIDIAN: - rc = uwatec_smart_parser_create (&parser, data->context, data->descriptor->model, 0, 0); + rc = uwatec_smart_parser_create (&parser, data->context, dc_descriptor_get_model(data->descriptor), 0, 0); break; case DC_FAMILY_HW_OSTC: #if defined(SSRF_CUSTOM_SERIAL) @@ -1120,7 +1120,7 @@ dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned } // Do not parse Aladin/Memomouse headers as they are fakes // Do not return on error, we can still parse the samples - if (data->descriptor->type != DC_FAMILY_UWATEC_ALADIN && data->descriptor->type != DC_FAMILY_UWATEC_MEMOMOUSE) { + if (dc_descriptor_get_type(data->descriptor) != DC_FAMILY_UWATEC_ALADIN && dc_descriptor_get_type(data->descriptor) != DC_FAMILY_UWATEC_MEMOMOUSE) { rc = libdc_header_parser (parser, data, dive); if (rc != DC_STATUS_SUCCESS) { report_error("Error parsing the dive header data. Dive # %d\nStatus = %s", dive->number, errmsg(rc)); |