From 983561b3538b184af3e2ed576bdab2180e436804 Mon Sep 17 00:00:00 2001 From: Anton Lundin Date: Thu, 29 Dec 2016 16:02:02 +0100 Subject: ostctools_import: Switch to using dc_parser_new2 Instead of creating the individual parsers, and keeping track of their arguments, this just uses the "new" dc_parser_new2 function ment for buffer parsing. Signed-off-by: Anton Lundin --- core/libdivecomputer.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index 8a8b215e8..e91240573 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -1082,26 +1082,12 @@ dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned 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, dc_descriptor_get_model(data->descriptor), 0, 0); - break; case DC_FAMILY_HW_OSTC: -#if defined(SSRF_CUSTOM_SERIAL) - rc = hw_ostc_parser_create (&parser, data->context, data->deviceid, 0); -#else - rc = hw_ostc_parser_create (&parser, data->context, data->deviceid); -#endif - break; case DC_FAMILY_HW_FROG: case DC_FAMILY_HW_OSTC3: -#if defined(SSRF_CUSTOM_SERIAL) - rc = hw_ostc_parser_create (&parser, data->context, data->deviceid, 1); -#else - rc = hw_ostc_parser_create (&parser, data->context, data->deviceid); -#endif + rc = dc_parser_new2(&parser, data->context, data->descriptor, 0, 0); break; default: report_error("Device type not handled!"); -- cgit v1.2.3-70-g09d2