From 12ff280d3be3a12d295ace8548154d91eb319bc2 Mon Sep 17 00:00:00 2001 From: Otto Winter Date: Fri, 24 May 2019 23:08:04 +0200 Subject: [PATCH] Lint --- tests/custom.h | 24 ++++++------------------ tests/livingroom32.cpp | 6 ++---- tests/livingroom8266.cpp | 4 +--- 3 files changed, 9 insertions(+), 25 deletions(-) diff --git a/tests/custom.h b/tests/custom.h index 0c30437b8c..7a5edbbf61 100644 --- a/tests/custom.h +++ b/tests/custom.h @@ -3,38 +3,26 @@ class CustomSensor : public Component, public Sensor { public: - void loop() override { - publish_state(42.0); - } + void loop() override { publish_state(42.0); } }; class CustomTextSensor : public Component, public TextSensor { public: - void loop() override { - publish_state("Hello World"); - } + void loop() override { publish_state("Hello World"); } }; class CustomBinarySensor : public Component, public BinarySensor { public: - void loop() override { - publish_state(false); - } + void loop() override { publish_state(false); } }; class CustomSwitch : public Switch { protected: - void write_state(bool state) override { - ESP_LOGD("custom_switch", "Setting %s", ONOFF(state)); - } + void write_state(bool state) override { ESP_LOGD("custom_switch", "Setting %s", ONOFF(state)); } }; class CustomComponent : public PollingComponent { public: - void setup() override { - ESP_LOGD("custom_component", "Setup"); - } - void update() override { - ESP_LOGD("custom_component", "Update"); - } + void setup() override { ESP_LOGD("custom_component", "Setup"); } + void update() override { ESP_LOGD("custom_component", "Update"); } }; diff --git a/tests/livingroom32.cpp b/tests/livingroom32.cpp index af4a713b6a..7005ec95e0 100644 --- a/tests/livingroom32.cpp +++ b/tests/livingroom32.cpp @@ -11,7 +11,7 @@ void setup() { App.init_ota()->start_safe_mode(); // LEDC is only available on ESP32! for the ESP8266, take a look at App.make_esp8266_pwm_output(). - auto *red = App.make_ledc_output(32); // on pin 32 + auto *red = App.make_ledc_output(32); // on pin 32 auto *green = App.make_ledc_output(33); auto *blue = App.make_ledc_output(34); App.make_rgb_light("Livingroom Light", red, green, blue); @@ -23,6 +23,4 @@ void setup() { App.setup(); } -void loop() { - App.loop(); -} +void loop() { App.loop(); } diff --git a/tests/livingroom8266.cpp b/tests/livingroom8266.cpp index cd43395d75..ad017ce73b 100644 --- a/tests/livingroom8266.cpp +++ b/tests/livingroom8266.cpp @@ -29,6 +29,4 @@ void setup() { App.setup(); } -void loop() { - App.loop(); -} +void loop() { App.loop(); }