On 21 August, 2015 - Anton Lundin wrote:

> diff --git a/libdivecomputer.c b/libdivecomputer.c
> index 64e76e3..bbabb1c 100644
> --- a/libdivecomputer.c
> +++ b/libdivecomputer.c
> @@ -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
> +     }

Also a bit ugly, but hey, we can figure out how to do this when we got a
ui that might make sense.

For now this is good enough to test it.

This way you can test libftdi based communication on a desktop too.


//Anton


-- 
Anton Lundin    +46702-161604
_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to