[clang-tidy] Concatenate nested namespaces (7/7: tests, platform-gated, enable check) (#16307)

This commit is contained in:
Jonathan Swoboda
2026-05-07 23:05:17 -04:00
committed by GitHub
parent 08b17c9da1
commit 696a654733
77 changed files with 150 additions and 314 deletions
-1
View File
@@ -96,7 +96,6 @@ Checks: >-
-modernize-avoid-variadic-functions,
-modernize-avoid-c-arrays,
-modernize-avoid-c-style-cast,
-modernize-concat-nested-namespaces,
-modernize-macro-to-enum,
-modernize-return-braced-init-list,
-modernize-type-traits,
+1 -1
View File
@@ -1 +1 @@
0c7f309d70eca8e3efd510092ddb23c530f3934c49371717efa124b788d761f8
c1e4375738304baabf7e915e5f7ca50fb22ec9b4a2d8312827a32a659f3fa40c
@@ -11,8 +11,7 @@ ADC_MODE(ADC_VCC)
#include <Arduino.h>
#endif // USE_ADC_SENSOR_VCC
namespace esphome {
namespace adc {
namespace esphome::adc {
static const char *const TAG = "adc.esp8266";
@@ -55,7 +54,6 @@ float ADCSensor::sample() {
return aggr.aggregate() / 1024.0f;
}
} // namespace adc
} // namespace esphome
} // namespace esphome::adc
#endif // USE_ESP8266
@@ -3,8 +3,7 @@
#include "adc_sensor.h"
#include "esphome/core/log.h"
namespace esphome {
namespace adc {
namespace esphome::adc {
static const char *const TAG = "adc.libretiny";
@@ -48,7 +47,6 @@ float ADCSensor::sample() {
return aggr.aggregate() / 1000.0f;
}
} // namespace adc
} // namespace esphome
} // namespace esphome::adc
#endif // USE_LIBRETINY
+2 -4
View File
@@ -15,8 +15,7 @@
#define PICO_VSYS_PIN 29 // NOLINT(cppcoreguidelines-macro-usage)
#endif
namespace esphome {
namespace adc {
namespace esphome::adc {
static const char *const TAG = "adc.rp2040";
@@ -98,7 +97,6 @@ float ADCSensor::sample() {
return aggr.aggregate() * 3.3f / 4096.0f * coeff;
}
} // namespace adc
} // namespace esphome
} // namespace esphome::adc
#endif // USE_RP2040
+2 -4
View File
@@ -5,8 +5,7 @@
#include "hal/nrf_saadc.h"
namespace esphome {
namespace adc {
namespace esphome::adc {
static const char *const TAG = "adc.zephyr";
@@ -202,6 +201,5 @@ float ADCSensor::sample() {
return val_mv / 1000.0f;
}
} // namespace adc
} // namespace esphome
} // namespace esphome::adc
#endif
@@ -33,8 +33,7 @@ static const uint32_t CTRL_NSSMD_3 = 1 << 17;
static const uint32_t SPI_TX_FINISH_EN = 1 << 2;
static const uint32_t SPI_RX_FINISH_EN = 1 << 3;
namespace esphome {
namespace beken_spi_led_strip {
namespace esphome::beken_spi_led_strip {
static const char *const TAG = "beken_spi_led_strip";
@@ -382,7 +381,6 @@ void BekenSPILEDStripLightOutput::dump_config() {
float BekenSPILEDStripLightOutput::get_setup_priority() const { return setup_priority::HARDWARE; }
} // namespace beken_spi_led_strip
} // namespace esphome
} // namespace esphome::beken_spi_led_strip
#endif // USE_BK72XX
@@ -8,8 +8,7 @@
#include "esphome/core/component.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace beken_spi_led_strip {
namespace esphome::beken_spi_led_strip {
enum RGBOrder : uint8_t {
ORDER_RGB,
@@ -79,7 +78,6 @@ class BekenSPILEDStripLightOutput : public light::AddressableLight {
optional<uint32_t> max_refresh_rate_{};
};
} // namespace beken_spi_led_strip
} // namespace esphome
} // namespace esphome::beken_spi_led_strip
#endif // USE_BK72XX
@@ -9,8 +9,7 @@
#include <cinttypes>
namespace esphome {
namespace bme68x_bsec2_i2c {
namespace esphome::bme68x_bsec2_i2c {
static const char *const TAG = "bme68x_bsec2_i2c.sensor";
@@ -53,6 +52,5 @@ void BME68xBSEC2I2CComponent::delay_us(uint32_t period, void *intfPtr) {
delayMicroseconds(period);
}
} // namespace bme68x_bsec2_i2c
} // namespace esphome
} // namespace esphome::bme68x_bsec2_i2c
#endif
@@ -9,8 +9,7 @@
#include "esphome/components/bme68x_bsec2/bme68x_bsec2.h"
#include "esphome/components/i2c/i2c.h"
namespace esphome {
namespace bme68x_bsec2_i2c {
namespace esphome::bme68x_bsec2_i2c {
class BME68xBSEC2I2CComponent : public bme68x_bsec2::BME68xBSEC2Component, public i2c::I2CDevice {
void setup() override;
@@ -23,6 +22,5 @@ class BME68xBSEC2I2CComponent : public bme68x_bsec2::BME68xBSEC2Component, publi
static void delay_us(uint32_t period, void *intfPtr);
};
} // namespace bme68x_bsec2_i2c
} // namespace esphome
} // namespace esphome::bme68x_bsec2_i2c
#endif
+2 -4
View File
@@ -15,8 +15,7 @@ extern uint32_t core_version;
extern const char *core_release;
}
namespace esphome {
namespace debug {
namespace esphome::debug {
static const char *const TAG = "debug";
@@ -170,6 +169,5 @@ void DebugComponent::update_platform_() {
#endif
}
} // namespace debug
} // namespace esphome
} // namespace esphome::debug
#endif
+2 -4
View File
@@ -2,8 +2,7 @@
#ifdef USE_HOST
#include <climits>
namespace esphome {
namespace debug {
namespace esphome::debug {
const char *DebugComponent::get_reset_reason_(std::span<char, RESET_REASON_BUFFER_SIZE> buffer) { return ""; }
@@ -15,6 +14,5 @@ size_t DebugComponent::get_device_info_(std::span<char, DEVICE_INFO_BUFFER_SIZE>
void DebugComponent::update_platform_() {}
} // namespace debug
} // namespace esphome
} // namespace esphome::debug
#endif
+2 -4
View File
@@ -2,8 +2,7 @@
#ifdef USE_LIBRETINY
#include "esphome/core/log.h"
namespace esphome {
namespace debug {
namespace esphome::debug {
static const char *const TAG = "debug";
@@ -62,6 +61,5 @@ void DebugComponent::update_platform_() {
#endif
}
} // namespace debug
} // namespace esphome
} // namespace esphome::debug
#endif
+2 -4
View File
@@ -12,8 +12,7 @@
#ifdef USE_RP2040_CRASH_HANDLER
#include "esphome/components/rp2040/crash_handler.h"
#endif
namespace esphome {
namespace debug {
namespace esphome::debug {
static const char *const TAG = "debug";
@@ -84,6 +83,5 @@ size_t DebugComponent::get_device_info_(std::span<char, DEVICE_INFO_BUFFER_SIZE>
void DebugComponent::update_platform_() {}
} // namespace debug
} // namespace esphome
} // namespace esphome::debug
#endif
@@ -3,8 +3,7 @@
#include <Esp.h>
namespace esphome {
namespace deep_sleep {
namespace esphome::deep_sleep {
static const char *const TAG = "deep_sleep";
@@ -20,6 +19,5 @@ void DeepSleepComponent::deep_sleep_() {
bool DeepSleepComponent::should_teardown_() { return true; }
} // namespace deep_sleep
} // namespace esphome
} // namespace esphome::deep_sleep
#endif
@@ -8,8 +8,7 @@
#include <core_esp8266_waveform.h>
namespace esphome {
namespace esp8266_pwm {
namespace esphome::esp8266_pwm {
static const char *const TAG = "esp8266_pwm";
@@ -53,7 +52,6 @@ void HOT ESP8266PWM::write_state(float state) {
}
}
} // namespace esp8266_pwm
} // namespace esphome
} // namespace esphome::esp8266_pwm
#endif
+2 -4
View File
@@ -7,8 +7,7 @@
#include "esphome/core/automation.h"
#include "esphome/components/output/float_output.h"
namespace esphome {
namespace esp8266_pwm {
namespace esphome::esp8266_pwm {
class ESP8266PWM : public output::FloatOutput, public Component {
public:
@@ -48,7 +47,6 @@ template<typename... Ts> class SetFrequencyAction : public Action<Ts...> {
ESP8266PWM *parent_;
};
} // namespace esp8266_pwm
} // namespace esphome
} // namespace esphome::esp8266_pwm
#endif
+2 -4
View File
@@ -3,8 +3,7 @@
#include "esphome/core/log.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace esp_ldo {
namespace esphome::esp_ldo {
static const char *const TAG = "esp_ldo";
void EspLdo::setup() {
@@ -41,7 +40,6 @@ void EspLdo::adjust_voltage(float voltage) {
}
}
} // namespace esp_ldo
} // namespace esphome
} // namespace esphome::esp_ldo
#endif // USE_ESP32_VARIANT_ESP32P4
+2 -4
View File
@@ -4,8 +4,7 @@
#include "esphome/core/automation.h"
#include "esp_ldo_regulator.h"
namespace esphome {
namespace esp_ldo {
namespace esphome::esp_ldo {
class EspLdo : public Component {
public:
@@ -40,7 +39,6 @@ template<typename... Ts> class AdjustAction : public Action<Ts...> {
EspLdo *ldo_;
};
} // namespace esp_ldo
} // namespace esphome
} // namespace esphome::esp_ldo
#endif // USE_ESP32_VARIANT_ESP32P4
+2 -4
View File
@@ -4,8 +4,7 @@
#include "esphome/core/hal.h"
namespace esphome {
namespace host {
namespace esphome::host {
class HostGPIOPin : public InternalGPIOPin {
public:
@@ -32,7 +31,6 @@ class HostGPIOPin : public InternalGPIOPin {
gpio::Flags flags_{};
};
} // namespace host
} // namespace esphome
} // namespace esphome::host
#endif // USE_HOST
@@ -3,8 +3,7 @@
#ifdef USE_LIBRETINY
namespace esphome {
namespace libretiny_pwm {
namespace esphome::libretiny_pwm {
static const char *const TAG = "libretiny.pwm";
@@ -49,7 +48,6 @@ void LibreTinyPWM::update_frequency(float frequency) {
this->write_state(this->duty_);
}
} // namespace libretiny_pwm
} // namespace esphome
} // namespace esphome::libretiny_pwm
#endif
@@ -7,8 +7,7 @@
#ifdef USE_LIBRETINY
namespace esphome {
namespace libretiny_pwm {
namespace esphome::libretiny_pwm {
class LibreTinyPWM : public output::FloatOutput, public Component {
public:
@@ -49,7 +48,6 @@ template<typename... Ts> class SetFrequencyAction : public Action<Ts...> {
LibreTinyPWM *parent_;
};
} // namespace libretiny_pwm
} // namespace esphome
} // namespace esphome::libretiny_pwm
#endif
+2 -11
View File
@@ -3,15 +3,7 @@
#include "color_mode.h"
#include "esphome/core/helpers.h"
namespace esphome {
#ifdef USE_API
namespace api {
class APIConnection;
} // namespace api
#endif
namespace light {
namespace esphome::light {
/// This class is used to represent the capabilities of a light.
class LightTraits {
@@ -43,5 +35,4 @@ class LightTraits {
ColorModeMask supported_color_modes_{};
};
} // namespace light
} // namespace esphome
} // namespace esphome::light
+2 -4
View File
@@ -10,8 +10,7 @@
#include <cstring>
#include "esphome/core/helpers.h"
namespace esphome {
namespace lightwaverf {
namespace esphome::lightwaverf {
/**
Pin change interrupt routine that identifies 1 and 0 LightwaveRF bits
@@ -430,6 +429,5 @@ void LwRx::rx_remove_pair_(uint8_t *buf) {
}
}
} // namespace lightwaverf
} // namespace esphome
} // namespace esphome::lightwaverf
#endif
+2 -4
View File
@@ -11,8 +11,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace lightwaverf {
namespace esphome::lightwaverf {
static const uint8_t TX_NIBBLE[] = {0xF6, 0xEE, 0xED, 0xEB, 0xDE, 0xDD, 0xDB, 0xBE,
0xBD, 0xBB, 0xB7, 0x7E, 0x7D, 0x7B, 0x77, 0x6F};
@@ -208,6 +207,5 @@ void LwTx::lw_timer_stop() {
}
}
} // namespace lightwaverf
} // namespace esphome
} // namespace esphome::lightwaverf
#endif
@@ -5,8 +5,7 @@
#include "lightwaverf.h"
namespace esphome {
namespace lightwaverf {
namespace esphome::lightwaverf {
static const char *const TAG = "lightwaverf.sensor";
@@ -62,7 +61,6 @@ void LightWaveRF::dump_config() {
LOG_PIN(" Pin RX: ", this->pin_rx_);
LOG_UPDATE_INTERVAL(this);
}
} // namespace lightwaverf
} // namespace esphome
} // namespace esphome::lightwaverf
#endif
+2 -4
View File
@@ -11,8 +11,7 @@
#include "LwRx.h"
#include "LwTx.h"
namespace esphome {
namespace lightwaverf {
namespace esphome::lightwaverf {
#ifdef USE_ESP8266
@@ -61,6 +60,5 @@ template<typename... Ts> class SendRawAction : public Action<Ts...> {
};
#endif
} // namespace lightwaverf
} // namespace esphome
} // namespace esphome::lightwaverf
#endif
+2 -4
View File
@@ -4,8 +4,7 @@
#ifdef USE_REMOTE_TRANSMITTER
#include "esphome/components/remote_base/midea_protocol.h"
namespace esphome {
namespace midea {
namespace esphome::midea {
using remote_base::RemoteTransmitterBase;
using IrData = remote_base::MideaData;
@@ -84,8 +83,7 @@ class IrTransmitter {
RemoteTransmitterBase *transmitter_{nullptr};
};
} // namespace midea
} // namespace esphome
} // namespace esphome::midea
#endif
#endif // USE_ARDUINO
+2 -4
View File
@@ -3,8 +3,7 @@
#include "mipi_dsi.h"
#include "esphome/core/helpers.h"
namespace esphome {
namespace mipi_dsi {
namespace esphome::mipi_dsi {
// Maximum bytes to log for init commands (truncated if larger)
static constexpr size_t MIPI_DSI_MAX_CMD_LOG_BYTES = 64;
@@ -411,6 +410,5 @@ void MIPI_DSI::dump_config() {
YESNO(this->invert_colors_), this->pclk_frequency_);
LOG_PIN(" Reset Pin ", this->reset_pin_);
}
} // namespace mipi_dsi
} // namespace esphome
} // namespace esphome::mipi_dsi
#endif // USE_ESP32_VARIANT_ESP32P4
+2 -4
View File
@@ -16,8 +16,7 @@
#include "esp_lcd_mipi_dsi.h"
namespace esphome {
namespace mipi_dsi {
namespace esphome::mipi_dsi {
constexpr static const char *const TAG = "display.mipi_dsi";
const uint8_t SW_RESET_CMD = 0x01;
@@ -113,6 +112,5 @@ class MIPI_DSI : public display::Display {
uint16_t y_high_{0};
};
} // namespace mipi_dsi
} // namespace esphome
} // namespace esphome::mipi_dsi
#endif
+2 -4
View File
@@ -8,8 +8,7 @@
#include <esp_lcd_panel_rgb.h>
#include <span>
namespace esphome {
namespace mipi_rgb {
namespace esphome::mipi_rgb {
static const uint8_t DELAY_FLAG = 0xFF;
@@ -400,6 +399,5 @@ void MipiRgb::dump_config() {
this->dump_pins_(3, 8, "Red", 0);
}
} // namespace mipi_rgb
} // namespace esphome
} // namespace esphome::mipi_rgb
#endif // defined(USE_ESP32_VARIANT_ESP32S3) || defined(USE_ESP32_VARIANT_ESP32P4)
+2 -4
View File
@@ -8,8 +8,7 @@
#include "esphome/components/spi/spi.h"
#endif
namespace esphome {
namespace mipi_rgb {
namespace esphome::mipi_rgb {
constexpr static const char *const TAG = "display.mipi_rgb";
const uint8_t SW_RESET_CMD = 0x01;
@@ -120,6 +119,5 @@ class MipiRgbSpi : public MipiRgb,
};
#endif
} // namespace mipi_rgb
} // namespace esphome
} // namespace esphome::mipi_rgb
#endif
@@ -11,8 +11,7 @@
#include "NeoPixelBus.h"
namespace esphome {
namespace neopixelbus {
namespace esphome::neopixelbus {
enum class ESPNeoPixelOrder {
GBWR = 0b11000110,
@@ -140,7 +139,6 @@ class NeoPixelRGBWLightOutput : public NeoPixelBusLightOutputBase<T_METHOD, T_CO
}
};
} // namespace neopixelbus
} // namespace esphome
} // namespace esphome::neopixelbus
#endif // USE_ARDUINO
+2 -4
View File
@@ -3,8 +3,7 @@
#include "esphome/core/helpers.h"
#include "esphome/core/log.h"
namespace esphome {
namespace qspi_dbi {
namespace esphome::qspi_dbi {
// Maximum bytes to log in verbose hex output
static constexpr size_t QSPI_DBI_MAX_LOG_BYTES = 64;
@@ -226,6 +225,5 @@ void QspiDbi::dump_config() {
LOG_PIN(" Reset Pin: ", this->reset_pin_);
}
} // namespace qspi_dbi
} // namespace esphome
} // namespace esphome::qspi_dbi
#endif
+2 -4
View File
@@ -11,8 +11,7 @@
#include "esp_lcd_panel_rgb.h"
namespace esphome {
namespace qspi_dbi {
namespace esphome::qspi_dbi {
constexpr static const char *const TAG = "display.qspi_dbi";
static const uint8_t SW_RESET_CMD = 0x01;
@@ -168,6 +167,5 @@ class QspiDbi : public display::DisplayBuffer,
esp_lcd_panel_handle_t handle_{};
};
} // namespace qspi_dbi
} // namespace esphome
} // namespace esphome::qspi_dbi
#endif
+1 -3
View File
@@ -7,8 +7,6 @@
extern "C" unsigned long ulMainGetRunTimeCounterValue();
namespace esphome {
namespace rp2040 {} // namespace rp2040
} // namespace esphome
namespace esphome::rp2040 {} // namespace esphome::rp2040
#endif // USE_RP2040
+2 -4
View File
@@ -5,8 +5,7 @@
#include <Arduino.h>
#include "esphome/core/hal.h"
namespace esphome {
namespace rp2040 {
namespace esphome::rp2040 {
class RP2040GPIOPin : public InternalGPIOPin {
public:
@@ -33,7 +32,6 @@ class RP2040GPIOPin : public InternalGPIOPin {
gpio::Flags flags_{};
};
} // namespace rp2040
} // namespace esphome
} // namespace esphome::rp2040
#endif // USE_RP2040
@@ -12,8 +12,7 @@
#include <pico/sem.h>
#include <pico/stdlib.h>
namespace esphome {
namespace rp2040_pio_led_strip {
namespace esphome::rp2040_pio_led_strip {
static const char *TAG = "rp2040_pio_led_strip";
@@ -210,7 +209,6 @@ void RP2040PIOLEDStripLightOutput::dump_config() {
float RP2040PIOLEDStripLightOutput::get_setup_priority() const { return setup_priority::HARDWARE; }
} // namespace rp2040_pio_led_strip
} // namespace esphome
} // namespace esphome::rp2040_pio_led_strip
#endif
@@ -16,8 +16,7 @@
#include <pico/sem.h>
#include <map>
namespace esphome {
namespace rp2040_pio_led_strip {
namespace esphome::rp2040_pio_led_strip {
enum RGBOrder : uint8_t {
ORDER_RGB,
@@ -127,7 +126,6 @@ class RP2040PIOLEDStripLightOutput : public light::AddressableLight {
inline static struct semaphore dma_write_complete_sem_[12];
};
} // namespace rp2040_pio_led_strip
} // namespace esphome
} // namespace esphome::rp2040_pio_led_strip
#endif // USE_RP2040
+2 -4
View File
@@ -11,8 +11,7 @@
#include <hardware/pwm.h>
#include <cmath>
namespace esphome {
namespace rp2040_pwm {
namespace esphome::rp2040_pwm {
static const char *const TAG = "rp2040_pwm";
@@ -60,7 +59,6 @@ void HOT RP2040PWM::write_state(float state) {
pwm_set_gpio_level(this->pin_->get_pin(), state * this->wrap_);
}
} // namespace rp2040_pwm
} // namespace esphome
} // namespace esphome::rp2040_pwm
#endif
+2 -4
View File
@@ -7,8 +7,7 @@
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
namespace esphome {
namespace rp2040_pwm {
namespace esphome::rp2040_pwm {
class RP2040PWM : public output::FloatOutput, public Component {
public:
@@ -53,7 +52,6 @@ template<typename... Ts> class SetFrequencyAction : public Action<Ts...> {
RP2040PWM *parent_;
};
} // namespace rp2040_pwm
} // namespace esphome
} // namespace esphome::rp2040_pwm
#endif // USE_RP2040
@@ -4,8 +4,7 @@
#include "esphome/core/log.h"
#include <driver/gpio.h>
namespace esphome {
namespace rpi_dpi_rgb {
namespace esphome::rpi_dpi_rgb {
void RpiDpiRgb::setup() {
this->reset_display_();
@@ -160,7 +159,6 @@ void RpiDpiRgb::reset_display_() const {
}
}
} // namespace rpi_dpi_rgb
} // namespace esphome
} // namespace esphome::rpi_dpi_rgb
#endif // USE_ESP32_VARIANT_ESP32S3
+2 -4
View File
@@ -14,8 +14,7 @@
#include "esp_lcd_panel_rgb.h"
namespace esphome {
namespace rpi_dpi_rgb {
namespace esphome::rpi_dpi_rgb {
constexpr static const char *const TAG = "rpi_dpi_rgb";
@@ -92,6 +91,5 @@ class RpiDpiRgb : public display::Display {
esp_lcd_panel_handle_t handle_{};
};
} // namespace rpi_dpi_rgb
} // namespace esphome
} // namespace esphome::rpi_dpi_rgb
#endif // USE_ESP32_VARIANT_ESP32S3
+2 -4
View File
@@ -2,8 +2,7 @@
#include "sdl_esphome.h"
#include "esphome/components/display/display_color_utils.h"
namespace esphome {
namespace sdl {
namespace esphome::sdl {
int Sdl::get_width() {
switch (this->rotation_) {
@@ -162,6 +161,5 @@ void Sdl::loop() {
}
}
} // namespace sdl
} // namespace esphome
} // namespace esphome::sdl
#endif
+2 -4
View File
@@ -9,8 +9,7 @@
#include "SDL.h"
#include <map>
namespace esphome {
namespace sdl {
namespace esphome::sdl {
constexpr static const char *const TAG = "sdl";
@@ -66,7 +65,6 @@ class Sdl : public display::Display {
uint16_t y_high_{0};
std::map<int32_t, CallbackManager<void(bool)>> key_callbacks_{};
};
} // namespace sdl
} // namespace esphome
} // namespace esphome::sdl
#endif
@@ -4,8 +4,7 @@
#include "../sdl_esphome.h"
#include "esphome/components/touchscreen/touchscreen.h"
namespace esphome {
namespace sdl {
namespace esphome::sdl {
class SdlTouchscreen : public touchscreen::Touchscreen, public Parented<Sdl> {
public:
@@ -21,6 +20,5 @@ class SdlTouchscreen : public touchscreen::Touchscreen, public Parented<Sdl> {
}
};
} // namespace sdl
} // namespace esphome
} // namespace esphome::sdl
#endif
+2 -4
View File
@@ -23,8 +23,7 @@
#ifdef USE_SHD_FIRMWARE_DATA
#include "stm32flash.h"
namespace esphome {
namespace shelly_dimmer {
namespace esphome::shelly_dimmer {
constexpr uint32_t SZ_128 = 0x00000080;
constexpr uint32_t SZ_256 = 0x00000100;
@@ -153,7 +152,6 @@ constexpr stm32_dev_t DEVICES[] = {
{0x0, "", 0x0, 0x0, 0x0, 0x0, 0x0, nullptr, 0x0, 0x0, 0x0, 0x0, 0x0},
};
} // namespace shelly_dimmer
} // namespace esphome
} // namespace esphome::shelly_dimmer
#endif // USE_SHD_FIRMWARE_DATA
@@ -56,8 +56,7 @@ template<typename T, size_t N> constexpr size_t size(const T (&/*unused*/)[N]) n
} // Anonymous namespace
namespace esphome {
namespace shelly_dimmer {
namespace esphome::shelly_dimmer {
/// Computes a crappy checksum as defined by the Shelly Dimmer protocol.
uint16_t shelly_dimmer_checksum(const uint8_t *buf, int len) {
@@ -522,7 +521,6 @@ void ShellyDimmer::reset_dfu_boot_() {
this->reset_(true);
}
} // namespace shelly_dimmer
} // namespace esphome
} // namespace esphome::shelly_dimmer
#endif // USE_ESP8266
@@ -10,8 +10,7 @@
#include <array>
namespace esphome {
namespace shelly_dimmer {
namespace esphome::shelly_dimmer {
class ShellyDimmer : public PollingComponent, public light::LightOutput, public uart::UARTDevice {
private:
@@ -117,7 +116,6 @@ class ShellyDimmer : public PollingComponent, public light::LightOutput, public
void reset_dfu_boot_();
};
} // namespace shelly_dimmer
} // namespace esphome
} // namespace esphome::shelly_dimmer
#endif // USE_ESP8266
@@ -112,8 +112,7 @@ constexpr char TAG[] = "stm32flash";
} // Anonymous namespace
namespace esphome {
namespace shelly_dimmer {
namespace esphome::shelly_dimmer {
namespace {
@@ -487,12 +486,6 @@ template<typename T> stm32_unique_ptr make_stm32_with_deletor(T ptr) {
} // Anonymous namespace
} // namespace shelly_dimmer
} // namespace esphome
namespace esphome {
namespace shelly_dimmer {
/* find newer command by higher code */
#define newer(prev, a) (((prev) == STM32_CMD_ERR) ? (a) : (((prev) > (a)) ? (prev) : (a)))
@@ -1059,7 +1052,6 @@ stm32_err_t stm32_crc_wrapper(const stm32_unique_ptr &stm, uint32_t address, uin
return STM32_ERR_OK;
}
} // namespace shelly_dimmer
} // namespace esphome
} // namespace esphome::shelly_dimmer
#endif // USE_SHD_FIRMWARE_DATA

Some files were not shown because too many files have changed in this diff Show More