diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-04-16 18:14:59 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-04-24 17:54:08 -0700 |
commit | 13f5c75ac49d88bd1d1f45e798a5e75b6426aa81 (patch) | |
tree | 8f8e4021f34dca2551aca707f41b8ef3c509d444 /desktop-widgets | |
parent | c07faa90f33fac895e8a0b3326adb298a1845063 (diff) | |
download | subsurface-13f5c75ac49d88bd1d1f45e798a5e75b6426aa81.tar.gz |
Convert our custom IO model to new libdivecomputer IO model
This converts our old custom IO model to the new model that
libdivecomputer introduced. This is partly based on Jef's rough patch
to make things build, with further work by me.
The FTDI code is temporarily disabled here, because it will need to be
integrated with the new way of opening devices.
The ble_serial code goes away entirely, since now libdivecomputer knows
about BLE transport natively, and doesn't need to have any serial
wrapper around it.
Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/downloadfromdivecomputer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop-widgets/downloadfromdivecomputer.cpp b/desktop-widgets/downloadfromdivecomputer.cpp index ad8416a07..e185960c9 100644 --- a/desktop-widgets/downloadfromdivecomputer.cpp +++ b/desktop-widgets/downloadfromdivecomputer.cpp @@ -84,7 +84,7 @@ DownloadFromDCWidget::DownloadFromDCWidget(QWidget *parent, Qt::WindowFlags f) : ui.downloadCancelRetryButton->setText(tr("Download")); QString deviceText = dc->dc_device(); -#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO) +#if defined(BT_SUPPORT) ui.bluetoothMode->setText(tr("Choose Bluetooth download mode")); ui.bluetoothMode->setChecked(dc->downloadMode() == DC_TRANSPORT_BLUETOOTH); btDeviceSelectionDialog = 0; @@ -318,7 +318,7 @@ void DownloadFromDCWidget::on_downloadCancelRetryButton_clicked() dc->setProduct(data->product()); dc->setDevice(data->devName()); -#if defined(BT_SUPPORT) && defined(SSRF_CUSTOM_IO) +#if defined(BT_SUPPORT) dc->setDownloadMode(ui.bluetoothMode->isChecked() ? DC_TRANSPORT_BLUETOOTH : DC_TRANSPORT_SERIAL); #endif @@ -477,7 +477,7 @@ void DownloadFromDCWidget::updateDeviceEnabled() descriptor = descriptorLookup.value(ui.vendor->currentText() + ui.product->currentText()); // call dc_descriptor_get_transport to see if the dc_transport_t is DC_TRANSPORT_SERIAL - if (dc_descriptor_get_transport(descriptor) == DC_TRANSPORT_SERIAL) { + if (dc_descriptor_get_transports(descriptor) & DC_TRANSPORT_SERIAL) { // if the dc_transport_t is DC_TRANSPORT_SERIAL, then enable the device node box. ui.device->setEnabled(true); } else { |