diff options
author | chegewara <imperiaonline4@gmail.com> | 2018-11-30 10:59:14 +0100 |
---|---|---|
committer | chegewara <imperiaonline4@gmail.com> | 2018-11-30 10:59:14 +0100 |
commit | 934702b6169b92c71cbc850876fd17fb9ee3236d (patch) | |
tree | 048df4f7106cd4a574b609a13e62a36567f5a322 /src/BLEBeacon.cpp | |
parent | Upload of 0.4.16 (diff) | |
download | thermostat-934702b6169b92c71cbc850876fd17fb9ee3236d.tar.gz thermostat-934702b6169b92c71cbc850876fd17fb9ee3236d.tar.bz2 thermostat-934702b6169b92c71cbc850876fd17fb9ee3236d.zip |
Changes, bugfixes and updgrades. Library is ready to work with arduino-esp32 v1.0.1.
Diffstat (limited to 'src/BLEBeacon.cpp')
-rw-r--r-- | src/BLEBeacon.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/BLEBeacon.cpp b/src/BLEBeacon.cpp index a63197c..68f8d8e 100644 --- a/src/BLEBeacon.cpp +++ b/src/BLEBeacon.cpp @@ -7,12 +7,17 @@ #include "sdkconfig.h" #if defined(CONFIG_BT_ENABLED) #include <string.h> -#include <esp_log.h> #include "BLEBeacon.h" +#if defined(ARDUINO_ARCH_ESP32) && defined(CONFIG_ARDUHAL_ESP_LOG) +#include "esp32-hal-log.h" +#define LOG_TAG "" +#else +#include "esp_log.h" +static const char* LOG_TAG = "BLEBeacon"; +#endif #define ENDIAN_CHANGE_U16(x) ((((x)&0xFF00)>>8) + (((x)&0xFF)<<8)) -static const char LOG_TAG[] = "BLEBeacon"; BLEBeacon::BLEBeacon() { m_beaconData.manufacturerId = 0x4c00; @@ -25,7 +30,7 @@ BLEBeacon::BLEBeacon() { } // BLEBeacon std::string BLEBeacon::getData() { - return std::string((char*)&m_beaconData, sizeof(m_beaconData)); + return std::string((char*) &m_beaconData, sizeof(m_beaconData)); } // getData uint16_t BLEBeacon::getMajor() { |