aboutsummaryrefslogtreecommitdiffstats
path: root/core/downloadfromdcthread.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-08 19:45:40 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-08-11 11:14:22 -0700
commitae6756e7f152ffe284d904261eccf0e9a9f63196 (patch)
tree44f78ca37c8a516d0e7c816bf02ee32a2691bc7e /core/downloadfromdcthread.cpp
parent23bde692fa5117fbf73cc6972ad882c0601685bd (diff)
downloadsubsurface-ae6756e7f152ffe284d904261eccf0e9a9f63196.tar.gz
Android: don't assume that non-BT means FTDI on Android
We do support download from USB devices like the Atomic Aquatics Cobalt. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/downloadfromdcthread.cpp')
-rw-r--r--core/downloadfromdcthread.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/downloadfromdcthread.cpp b/core/downloadfromdcthread.cpp
index 822f55241..a05dffb8d 100644
--- a/core/downloadfromdcthread.cpp
+++ b/core/downloadfromdcthread.cpp
@@ -4,6 +4,9 @@
#include "core/subsurface-qt/SettingsObjectWrapper.h"
#include <QDebug>
#include <QRegularExpression>
+#if defined(Q_OS_ANDROID)
+#include "core/subsurface-string.h"
+#endif
QStringList vendorList;
QHash<QString, QStringList> productList;
@@ -32,8 +35,8 @@ void DownloadThread::run()
internalData->descriptor = descriptorLookup[m_data->vendor() + m_data->product()];
internalData->download_table = &downloadTable;
#if defined(Q_OS_ANDROID)
- // on Android we either use BT or we download via FTDI cable
- if (!internalData->bluetooth_mode)
+ // on Android we either use BT, a USB device, or we download via FTDI cable
+ if (!internalData->bluetooth_mode && (same_string(internalData->devname, "FTDI") || same_string(internalData->devname, "")))
internalData->devname = "ftdi";
#endif
qDebug() << "Starting download from " << (internalData->bluetooth_mode ? "BT" : internalData->devname);