auto formatting

This commit is contained in:
proddy
2020-10-31 08:36:38 +01:00
parent 611f1962d3
commit 5f2d55ea09
4 changed files with 8 additions and 9 deletions

View File

@@ -764,7 +764,6 @@ void Boiler::check_active() {
Mqtt::publish(F("tapwater_active"), Helpers::render_boolean(s, b)); Mqtt::publish(F("tapwater_active"), Helpers::render_boolean(s, b));
EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class EMSESP::tap_water_active(b); // let EMS-ESP know, used in the Shower class
} }
} }
// 0x33 // 0x33

View File

@@ -1305,13 +1305,13 @@ void Thermostat::process_RC300OutdoorTemp(std::shared_ptr<const Telegram> telegr
// 0x240 RC300 parameter // 0x240 RC300 parameter
void Thermostat::process_RC300Settings(std::shared_ptr<const Telegram> telegram) { void Thermostat::process_RC300Settings(std::shared_ptr<const Telegram> 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 // 0x267 RC300 floordrying
void Thermostat::process_RC300Floordry(std::shared_ptr<const Telegram> telegram) { void Thermostat::process_RC300Floordry(std::shared_ptr<const Telegram> telegram) {
changed_ |= telegram->read_value(floordrystatus_ , 0); changed_ |= telegram->read_value(floordrystatus_, 0);
changed_ |= telegram->read_value(floordrytemp_ , 1); changed_ |= telegram->read_value(floordrytemp_, 1);
} }
// type 0x41 - data from the RC30 thermostat(0x10) - 14 bytes long // type 0x41 - data from the RC30 thermostat(0x10) - 14 bytes long

View File

@@ -139,7 +139,7 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
// return name of the device type, capitalized // return name of the device type, capitalized
std::string EMSdevice::device_type_name() const { std::string EMSdevice::device_type_name() const {
std::string s = device_type_2_device_name(device_type_); std::string s = device_type_2_device_name(device_type_);
s[0] = toupper(s[0]); s[0] = toupper(s[0]);
return s; return s;
} }

View File

@@ -55,12 +55,12 @@ class EMSFactory {
} }
// Construct derived class returning an unique ptr // 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<EMSdevice> { -> std::unique_ptr<EMSdevice> {
return std::unique_ptr<EMSdevice>(EMSFactory::makeRaw(device_type, device_id, product_id, version, name, flags, brand)); return std::unique_ptr<EMSdevice>(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; -> EMSdevice * = 0;
private: private:
@@ -72,7 +72,7 @@ class EMSFactory {
// Construct derived class returning a raw pointer // Construct derived class returning a raw pointer
// find which EMS device it is and use that class // 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 * { -> EMSdevice * {
auto it = EMSFactory::getRegister().find(device_type); auto it = EMSFactory::getRegister().find(device_type);
if (it != EMSFactory::getRegister().end()) { if (it != EMSFactory::getRegister().end()) {
@@ -90,7 +90,7 @@ class ConcreteEMSFactory : EMSFactory {
EMSFactory::registerFactory(device_type, this); 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 * { -> EMSdevice * {
return new DerivedClass(device_type, device_id, product_id, version, name, flags, brand); return new DerivedClass(device_type, device_id, product_id, version, name, flags, brand);
} }