mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Connect up serial_ftdi custom serial
This connects the serial_ftdi implementation to subsurface, and builds libftdi1 for the android builds. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e2c98def26
commit
8d73e4f81c
4 changed files with 43 additions and 2 deletions
|
@ -925,10 +925,17 @@ 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;
|
||||
dc_serial_t *serial_device = NULL;
|
||||
|
||||
if (data->bluetooth_mode) {
|
||||
rc = dc_serial_qt_open(&serial_device, data->context, data->devname);
|
||||
#ifdef SERIAL_FTDI
|
||||
} else if (!strcmp(data->devname, "ftdi")) {
|
||||
rc = dc_serial_ftdi_open(&serial_device, data->context);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (serial_device) {
|
||||
if (rc == DC_STATUS_SUCCESS) {
|
||||
rc = dc_device_custom_open(&data->device, data->context, data->descriptor, serial_device);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue