Skip to content

Commit 9dea2d1

Browse files
committed
BM hack for iOS (WIP)
1 parent 1134c63 commit 9dea2d1

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

src/DeviceManager_theengs.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,18 @@ Device * DeviceManager::createTheengsDevice_fromAdv(const QBluetoothDeviceInfo &
323323
device = nullptr;
324324
}
325325
}
326+
else
327+
{
328+
#if defined(Q_OS_IOS)
329+
// Theengs BM2 hack for iOS & missing iBeacon
330+
if (deviceInfo.name() == "Battery Monitor")
331+
{
332+
deviceModelID = "BM2";
333+
deviceProps.clear();
334+
device = new DeviceTheengsBM26(deviceInfo, deviceModelID, deviceProps, this);
335+
}
336+
#endif
337+
}
326338

327339
if (!device)
328340
{

src/device.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1767,7 +1767,7 @@ void Device::setTheengsModelId(const QString &model, const QString &modelID)
17671767
//qDebug() << "Device::setTheengsModelId() model" << model << " - modelID" << id;
17681768

17691769
Q_UNUSED(model)
1770-
setModel(modelID);
1770+
setModel(modelID, false);
17711771
}
17721772

17731773
void Device::changeTheengsModelId(const QString &model, const QString &modelID)

0 commit comments

Comments
 (0)