mirror of
https://github.com/esphome/esphome.git
synced 2024-12-18 15:57:58 +01:00
Add TAG to all compile units (#2060)
When using static TAG is only valid in the current compile unit. For some reason it seems that the current ESP8266/ESP32 compiler use the instance from ble.cpp, but it seems that this causes issues with newer compiler leading to compile time errors like this: In file included from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-log.h:164, from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal.h:71, from /root/.platformio/packages/framework-arduinoespressif32/cores/esp32/Arduino.h:36, from src/esphome/core/esphal.h:3, from src/esphome/core/helpers.h:10, from src/esphome/components/esp32_ble/ble_uuid.h:3, from src/esphome/components/esp32_ble/ble_advertising.cpp:5: src/esphome/components/esp32_ble/ble_advertising.cpp: In member function 'void esphome::esp32_ble::BLEAdvertising::start()': src/esphome/components/esp32_ble/ble_advertising.cpp:64:14: error: 'TAG' was not declared in this scope ESP_LOGE(TAG, "esp_ble_gap_config_adv_data failed (Advertising): %d", err); ^~~
This commit is contained in:
parent
03e317d052
commit
f0d9ad6a4e
@ -7,6 +7,8 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *const TAG = "esp32_ble";
|
||||
|
||||
BLEAdvertising::BLEAdvertising() {
|
||||
this->advertising_data_.set_scan_rsp = false;
|
||||
this->advertising_data_.include_name = true;
|
||||
|
@ -5,6 +5,8 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *const TAG = "esp32_ble";
|
||||
|
||||
ESPBTUUID::ESPBTUUID() : uuid_() {}
|
||||
ESPBTUUID ESPBTUUID::from_uint16(uint16_t uuid) {
|
||||
ESPBTUUID ret;
|
||||
|
Loading…
Reference in New Issue
Block a user