mirror of
https://github.com/esphome/esphome.git
synced 2025-09-05 21:02:20 +01:00
Avoid non-const globals and enable clang-tidy check (#1892)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *TAG = "esp32_ble";
|
||||
static const char *const TAG = "esp32_ble";
|
||||
|
||||
void ESP32BLE::setup() {
|
||||
global_ble = this;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *TAG = "esp32_ble.characteristic";
|
||||
static const char *const TAG = "esp32_ble.characteristic";
|
||||
|
||||
BLECharacteristic::BLECharacteristic(const ESPBTUUID uuid, uint32_t properties) : uuid_(uuid) {
|
||||
this->set_value_lock_ = xSemaphoreCreateBinary();
|
||||
|
@@ -9,7 +9,7 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *TAG = "esp32_ble.descriptor";
|
||||
static const char *const TAG = "esp32_ble.descriptor";
|
||||
|
||||
BLEDescriptor::BLEDescriptor(ESPBTUUID uuid, uint16_t max_len) {
|
||||
this->uuid_ = uuid;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *TAG = "esp32_ble.server";
|
||||
static const char *const TAG = "esp32_ble.server";
|
||||
|
||||
static const uint16_t device_information_service__UUID = 0x180A;
|
||||
static const uint16_t MODEL_UUID = 0x2A24;
|
||||
|
@@ -7,7 +7,7 @@
|
||||
namespace esphome {
|
||||
namespace esp32_ble {
|
||||
|
||||
static const char *TAG = "esp32_ble.service";
|
||||
static const char *const TAG = "esp32_ble.service";
|
||||
|
||||
BLEService::BLEService(ESPBTUUID uuid, uint16_t num_handles, uint8_t inst_id)
|
||||
: uuid_(uuid), num_handles_(num_handles), inst_id_(inst_id) {}
|
||||
|
Reference in New Issue
Block a user