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>
This commit is contained in:
Dirk Hohndel 2017-05-30 17:48:58 -07:00
parent e0771e50f1
commit be271e7d48
2 changed files with 13 additions and 0 deletions

View file

@ -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.