From f206ce71147be9fc29f67773fc77ac7f57499116 Mon Sep 17 00:00:00 2001 From: proddy Date: Sat, 26 Feb 2022 18:12:42 +0100 Subject: [PATCH] auto formatting --- src/devices/thermostat.h | 4 ++-- src/emsdevice.cpp | 5 +++-- src/mqtt.h | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/devices/thermostat.h b/src/devices/thermostat.h index d9f8969a3..e10eccda8 100644 --- a/src/devices/thermostat.h +++ b/src/devices/thermostat.h @@ -133,8 +133,8 @@ class Thermostat : public EMSdevice { } private: - uint8_t hc_num_; // heating circuit number 1..10 - uint8_t model_; // the model type + uint8_t hc_num_; // heating circuit number 1..10 + uint8_t model_; // the model type }; static std::string mode_tostring(uint8_t mode); diff --git a/src/emsdevice.cpp b/src/emsdevice.cpp index ab411413a..6263554ee 100644 --- a/src/emsdevice.cpp +++ b/src/emsdevice.cpp @@ -524,7 +524,7 @@ void EMSdevice::register_device_value(uint8_t tag, register_device_value(tag, value_p, type, options, name, uom, nullptr, 0, 0); } -// check if value is visiible +// check if value is visible bool EMSdevice::is_visible(void * value_p) { for (auto & dv : devicevalues_) { if (dv.value_p == value_p && dv.has_state(DeviceValueState::DV_VISIBLE)) { @@ -1263,7 +1263,8 @@ void EMSdevice::mqtt_ha_entity_config_create() { if (*(int8_t *)(dv.value_p) == 1 && (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) { dv.remove_state(DeviceValueState::DV_HA_CLIMATE_NO_RT); Mqtt::publish_ha_climate_config(dv.tag, true); - } else if (*(int8_t *)(dv.value_p) == 0 && (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || !dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) { + } else if (*(int8_t *)(dv.value_p) == 0 + && (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) || !dv.has_state(DeviceValueState::DV_HA_CLIMATE_NO_RT))) { dv.add_state(DeviceValueState::DV_HA_CLIMATE_NO_RT); Mqtt::publish_ha_climate_config(dv.tag, false); } diff --git a/src/mqtt.h b/src/mqtt.h index 413d28fd1..ebe8bac78 100644 --- a/src/mqtt.h +++ b/src/mqtt.h @@ -197,7 +197,7 @@ class Mqtt { } static void ha_climate_reset(bool reset) { - ha_climate_reset_ = reset;; + ha_climate_reset_ = reset; } static bool send_response() {