diff options
author | dakkar <dakkar@thenautilus.net> | 2019-02-22 12:39:08 +0000 |
---|---|---|
committer | dakkar <dakkar@thenautilus.net> | 2019-02-22 12:39:08 +0000 |
commit | 67a9dbb8e33e2bbb785e6a16a6ce5837c1a46c97 (patch) | |
tree | 0f5b064f03372305369a41b10e157aa89552e2f0 /sensor/patchedBLE/src/BLEBeacon.cpp | |
parent | uni-init BLE before sleeping (diff) | |
parent | Merge pull request #23 from tatsutaigu/master (diff) | |
download | thermostat-67a9dbb8e33e2bbb785e6a16a6ce5837c1a46c97.tar.gz thermostat-67a9dbb8e33e2bbb785e6a16a6ce5837c1a46c97.tar.bz2 thermostat-67a9dbb8e33e2bbb785e6a16a6ce5837c1a46c97.zip |
Merge commit 'b232e7f5f0e87f36afbc2f4e03a2c49c48dd47bc'
Diffstat (limited to 'sensor/patchedBLE/src/BLEBeacon.cpp')
-rw-r--r-- | sensor/patchedBLE/src/BLEBeacon.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sensor/patchedBLE/src/BLEBeacon.cpp b/sensor/patchedBLE/src/BLEBeacon.cpp index a63197c..68f8d8e 100644 --- a/sensor/patchedBLE/src/BLEBeacon.cpp +++ b/sensor/patchedBLE/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() { |