diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-05-30 17:48:58 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-05-31 10:14:24 -0700 |
commit | be271e7d4860a360081162edeafb76c3fd40d3da (patch) | |
tree | a3f03c6ec06a09f286588b1f95c9309db2b1de62 /mobile-widgets/qmlmanager.cpp | |
parent | e0771e50f1dda6897336b528a1d05a7c64cab611 (diff) | |
download | subsurface-be271e7d4860a360081162edeafb76c3fd40d3da.tar.gz |
QML UI: add getBtAddress function
This allows us to get the BT address of the first dive computer that we found.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index d9ec7c1c8..491c16825 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -249,6 +249,18 @@ int QMLManager::getProductIndex() return -1; } +QString QMLManager::getBtAddress() +{ +#if BT_SUPPORT + if (!btDCs.isEmpty()) { + QString btAddr = btDCs.first().btdi.address().toString(); + qDebug() << "getBtAddress" << btAddr; + return btAddr; + } + return QString(); +#endif +} + void QMLManager::finishSetup() { // Initialize cloud credentials. |