mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Allow to compile Subsurface with upstream libdivecomputer
This will create an inconsistent build that has some UI features implying BT support but those will be non-functional. I don't think this is the right thing to do - either fail to build with a decent message or really remove the BT support. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
fe8605ed5b
commit
fa69a1b7d5
3 changed files with 20 additions and 0 deletions
|
@ -924,6 +924,7 @@ const char *do_libdivecomputer_import(device_data_t *data)
|
|||
|
||||
err = translate("gettextFromC", "Unable to open %s %s (%s)");
|
||||
|
||||
#if defined(SSRF_CUSTOM_SERIAL)
|
||||
if (data->bluetooth_mode) {
|
||||
dc_serial_t *serial_device;
|
||||
|
||||
|
@ -935,6 +936,9 @@ const char *do_libdivecomputer_import(device_data_t *data)
|
|||
}
|
||||
|
||||
} else {
|
||||
#else
|
||||
{
|
||||
#endif
|
||||
rc = dc_device_open(&data->device, data->context, data->descriptor, data->devname);
|
||||
|
||||
if (rc != DC_STATUS_SUCCESS && subsurface_access(data->devname, R_OK | W_OK) != 0)
|
||||
|
@ -982,11 +986,19 @@ dc_status_t libdc_buffer_parser(struct dive *dive, device_data_t *data, unsigned
|
|||
rc = uwatec_smart_parser_create (&parser, data->context, data->descriptor->model, 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
|
||||
break;
|
||||
default:
|
||||
report_error("Device type not handled!");
|
||||
|
|
|
@ -53,7 +53,10 @@ extern const char *progress_bar_text;
|
|||
extern double progress_bar_fraction;
|
||||
extern char *logfile_name;
|
||||
extern char *dumpfile_name;
|
||||
|
||||
#if SSRF_CUSTOM_SERIAL
|
||||
extern dc_status_t dc_serial_qt_open(dc_serial_t **out, dc_context_t *context, const char *devaddr);
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
#include <libdivecomputer/version.h>
|
||||
|
||||
#if defined(SSRF_CUSTOM_SERIAL)
|
||||
|
||||
#include <libdivecomputer/custom_serial.h>
|
||||
|
||||
extern "C" {
|
||||
|
@ -246,3 +250,4 @@ dc_status_t dc_serial_qt_open(dc_serial_t **out, dc_context_t *context, const ch
|
|||
return DC_STATUS_SUCCESS;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue