-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Sensirion/fix-clang-tidy-issues
Fix several clang-tidiy issues
- Loading branch information
Showing
6 changed files
with
85 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,12 @@ | ||
#ifndef _SENSIRION_UPT_BLE_AUTO_DETECTION_BLECLIENTCALLBACK_H | ||
#define _SENSIRION_UPT_BLE_AUTO_DETECTION_BLECLIENTCALLBACK_H | ||
#ifndef SENSIRION_UPT_BLE_AUTO_DETECTION_BLE_CLIENT_CALLBACK_H | ||
#define SENSIRION_UPT_BLE_AUTO_DETECTION_BLE_CLIENT_CALLBACK_H | ||
|
||
class BleClientCallback { | ||
public: | ||
virtual ~BleClientCallback() { | ||
} | ||
virtual ~BleClientCallback() = default; | ||
|
||
virtual void onAdvertisementReceived(std::string address, std::string name, | ||
std::string data); | ||
virtual void onAdvertisementReceived(uint64_t address, std::string name, | ||
std::string data) = 0; | ||
}; | ||
|
||
#endif /* _SENSIRION_UPT_BLE_AUTO_DETECTION_BLECLIENTCALLBACK_H */ | ||
#endif /* SENSIRION_UPT_BLE_AUTO_DETECTION_BLE_CLIENT_CALLBACK_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
#ifndef _SENSIRION_UPT_BLE_AUTO_DETECTION_NIMBLECLIENT_H | ||
#define _SENSIRION_UPT_BLE_AUTO_DETECTION_NIMBLECLIENT_H | ||
#ifndef SENSIRION_UPT_BLE_AUTO_DETECTION_NIMBLE_CLIENT_H | ||
#define SENSIRION_UPT_BLE_AUTO_DETECTION_NIMBLE_CLIENT_H | ||
|
||
#include "BleClient.h" | ||
#include "NimBLEDevice.h" | ||
|
||
class NimBleClient: public BleClient, public NimBLEAdvertisedDeviceCallbacks { | ||
class __attribute__((unused)) NimBleClient | ||
: public BleClient, | ||
public NimBLEAdvertisedDeviceCallbacks { | ||
public: | ||
NimBleClient() : _bleScan(nullptr), _callback(nullptr){}; | ||
NimBleClient(); | ||
~NimBleClient(); | ||
void begin(BleClientCallback* callback) override; | ||
void keepAlive() override; | ||
|
||
private: | ||
NimBLEScan* _bleScan; | ||
BleClientCallback* _callback; | ||
void setupAndStartBleScans(); | ||
void onResult(NimBLEAdvertisedDevice* advertisedDevice); | ||
void setupBleScans(); | ||
void startBleScans(); | ||
void onResult(NimBLEAdvertisedDevice* advertisedDevice) override; | ||
}; | ||
|
||
#endif /* _SENSIRION_UPT_BLE_AUTO_DETECTION_NIMBLECLIENT_H */ | ||
#endif /* SENSIRION_UPT_BLE_AUTO_DETECTION_NIMBLE_CLIENT_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters