From 5f2d55ea096ff9030c431db510261cb3eb76c6b8 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 31 Oct 2020 08:36:38 +0100 Subject: [PATCH] auto formatting --- src/devices/boiler.cpp | 1 - src/devices/thermostat.cpp | 6 +++--- src/emsdevice.cpp | 2 +- src/emsfactory.h | 8 ++++---- 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index 18988e26c..097deb72d 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -764,7 +764,6 @@ void Boiler::check_active() { Mqtt::publish(F("tapwater_active"), Helpers::render_boolean(s, b)); EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class } - } // 0x33 diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 9a00036c4..995bb5bff 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1305,13 +1305,13 @@ void Thermostat::process_RC300OutdoorTemp(std::shared_ptr telegr // 0x240 RC300 parameter void Thermostat::process_RC300Settings(std::shared_ptr telegram) { - changed_ |= telegram->read_value(ibaBuildingType_ , 9); // 1=light, 2=medium, 3=heavy + changed_ |= telegram->read_value(ibaBuildingType_, 9); // 1=light, 2=medium, 3=heavy } // 0x267 RC300 floordrying void Thermostat::process_RC300Floordry(std::shared_ptr telegram) { - changed_ |= telegram->read_value(floordrystatus_ , 0); - changed_ |= telegram->read_value(floordrytemp_ , 1); + changed_ |= telegram->read_value(floordrystatus_, 0); + changed_ |= telegram->read_value(floordrytemp_, 1); } // type 0x41 - data from the RC30 thermostat(0x10) - 14 bytes long diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index 8c5db0653..cf6852be4 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -139,7 +139,7 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) { // return name of the device type, capitalized std::string EMSdevice::device_type_name() const { std::string s = device_type_2_device_name(device_type_); - s[0] = toupper(s[0]); + s[0] = toupper(s[0]); return s; } diff --git a/src/emsfactory.h b/src/emsfactory.h index ecc2b2556..2ef4addbb 100644 --- a/src/emsfactory.h +++ b/src/emsfactory.h @@ -55,12 +55,12 @@ class EMSFactory { } // Construct derived class returning an unique ptr - static auto add(const uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string &version, std::string &name, uint8_t flags, uint8_t brand) + static auto add(const uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string & version, std::string & name, uint8_t flags, uint8_t brand) -> std::unique_ptr { return std::unique_ptr(EMSFactory::makeRaw(device_type, device_id, product_id, version, name, flags, brand)); } - virtual auto construct(uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string &version, std::string &name, uint8_t flags, uint8_t brand) const + virtual auto construct(uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string & version, std::string & name, uint8_t flags, uint8_t brand) const -> EMSdevice * = 0; private: @@ -72,7 +72,7 @@ class EMSFactory { // Construct derived class returning a raw pointer // find which EMS device it is and use that class - static auto makeRaw(const uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string &version, std::string &name, uint8_t flags, uint8_t brand) + static auto makeRaw(const uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string & version, std::string & name, uint8_t flags, uint8_t brand) -> EMSdevice * { auto it = EMSFactory::getRegister().find(device_type); if (it != EMSFactory::getRegister().end()) { @@ -90,7 +90,7 @@ class ConcreteEMSFactory : EMSFactory { EMSFactory::registerFactory(device_type, this); } - auto construct(uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string &version, std::string &name, uint8_t flags, uint8_t brand) const + auto construct(uint8_t device_type, uint8_t device_id, uint8_t product_id, std::string & version, std::string & name, uint8_t flags, uint8_t brand) const -> EMSdevice * { return new DerivedClass(device_type, device_id, product_id, version, name, flags, brand); }