diff options
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() { |