Index: sources/bluetooth/BluetoothInterface.h =================================================================== diff -u -rb252cd2777aadbce2d04aa32cc275f193de0cf52 -raeb915075b9e13e5c1aaf2800ba6db03b6c24a0b --- sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision b252cd2777aadbce2d04aa32cc275f193de0cf52) +++ sources/bluetooth/BluetoothInterface.h (.../BluetoothInterface.h) (revision aeb915075b9e13e5c1aaf2800ba6db03b6c24a0b) @@ -57,6 +57,7 @@ bool _isValid = false ; + const QByteArray _bloodPressureNotifyValue = QByteArray::fromHex("0100"); const char *_invalidLocalAddress = "00:00:00:00:00:00"; QStringList _supportedDeviceKeywords { "BP7000", "BLEsmart", "BLESmart" }; // Regarding to Omron Documents. QBluetoothLocalDevice *_local = nullptr ; @@ -69,6 +70,7 @@ QLowEnergyService *_serviceBattery = nullptr ; QBluetoothDeviceInfo _temp ; + quint8 _tempBatt = 0 ; bool _reconnectionActive = false ; const quint16 _interval = 1000 ; // the interface timer base interval in mSec @@ -141,22 +143,24 @@ bool isAgentValid (); bool isInfoValid (); bool isDeviceValid (); - // bool isServiceValid (QLowEnergyService *vService); - bool isDetailValid (const QLowEnergyCharacteristic &vDetail); bool isDeviceSupported (const QString &vName ); bool connectToDevice (); bool reconnectToDevice (); void discoverServices (); void discoverServicesDetails(); void enableNotify (); - void readMeasurements (); - void readInformation (); + void requestMeasurements (); + void requestInformation (); + void requestBattery (); void printCharacteristics (QLowEnergyService *vService); void notifyStateChange (const BluetoothData &vData); void interpretBloodPressure (const QByteArray &vData); + void interpretInformation (); + void interpretBattery (const QByteArray &vData); + signals: void didStateChange (const BluetoothData &vData); void didActionReceive (const UIBloodPressureData &vData); @@ -165,10 +169,5 @@ SAFE_CALL(doStart ) SAFE_CALL(doScan ) - SAFE_CALL(doConnectToDevice ) - SAFE_CALL(doDiscoverServices ) - SAFE_CALL(doEnableNotify ) - SAFE_CALL(doReadMeasurements ) - SAFE_CALL(doReadInformation ) }; }