From 51769011beb226c07a77240fc27ba64f7e2a9c72 Mon Sep 17 00:00:00 2001 From: Proddy Date: Mon, 3 Jul 2023 08:56:08 +0200 Subject: [PATCH] autoformatting --- .../src/project/DashboardDevicesDialog.tsx | 1 - src/devices/thermostat.cpp | 6 +-- src/devices/ventilation.h | 2 +- src/roomcontrol.h | 39 +++++++++---------- src/system.cpp | 11 +++++- 5 files changed, 32 insertions(+), 27 deletions(-) diff --git a/interface/src/project/DashboardDevicesDialog.tsx b/interface/src/project/DashboardDevicesDialog.tsx index f1f43167a..e49f6c06e 100644 --- a/interface/src/project/DashboardDevicesDialog.tsx +++ b/interface/src/project/DashboardDevicesDialog.tsx @@ -101,7 +101,6 @@ const DashboarDevicesDialog = ({ if (dv.s) { helperText += 'n'; if (dv.m !== undefined && dv.x !== undefined) { - helperText += ' between ' + dv.m + ' and ' + dv.x; } else { helperText += ' , step ' + dv.s; diff --git a/src/devices/thermostat.cpp b/src/devices/thermostat.cpp index 1b00ba870..a8fb8873c 100644 --- a/src/devices/thermostat.cpp +++ b/src/devices/thermostat.cpp @@ -1170,9 +1170,9 @@ void Thermostat::process_HPSet(std::shared_ptr telegram) { if (hc == nullptr) { return; } - has_update(telegram, hc->dewoffset, 0); // 7-35°C - has_update(telegram, hc->roomtempdiff, 3); // 1-10K - has_update(telegram, hc->hpminflowtemp, 4); // 2-10K + has_update(telegram, hc->dewoffset, 0); // 7-35°C + has_update(telegram, hc->roomtempdiff, 3); // 1-10K + has_update(telegram, hc->hpminflowtemp, 4); // 2-10K } // type 0x41 - data from the RC30 thermostat(0x10) - 14 bytes long diff --git a/src/devices/ventilation.h b/src/devices/ventilation.h index 88b24d7ff..56cf4e287 100644 --- a/src/devices/ventilation.h +++ b/src/devices/ventilation.h @@ -45,7 +45,7 @@ class Ventilation : public EMSdevice { void process_ModeMessage(std::shared_ptr telegram); // 0x56B void process_BlowerMessage(std::shared_ptr telegram); // 0x56B void process_VOCMessage(std::shared_ptr telegram); // 0x56B - void process_BypassMessage(std::shared_ptr telegram); // 0x56B + void process_BypassMessage(std::shared_ptr telegram); // 0x56B bool set_ventMode(const char * value, const int8_t id); bool set_bypass(const char * value, const int8_t id); diff --git a/src/roomcontrol.h b/src/roomcontrol.h index 718d6d9e6..ddb207a68 100644 --- a/src/roomcontrol.h +++ b/src/roomcontrol.h @@ -1,4 +1,4 @@ -/* +SIGN_IN_ENDPOINT /* * EMS-ESP - https://github.com/emsesp/EMS-ESP * Copyright 2020-2023 Paul Derbyshire * @@ -15,34 +15,33 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - #ifndef EMSESP_ROOMCONTROL_H #define EMSESP_ROOMCONTROL_H #include "emsesp.h" -namespace emsesp { + namespace emsesp { -class Roomctrl { - public: - static void send(const uint8_t addr); - static void check(const uint8_t addr, const uint8_t * data); - static void set_remotetemp(const uint8_t hc, const int16_t temp); + class Roomctrl { + public: + static void send(const uint8_t addr); + static void check(const uint8_t addr, const uint8_t * data); + static void set_remotetemp(const uint8_t hc, const int16_t temp); - private: - static constexpr uint8_t ADDR = 0x18; - static constexpr uint32_t SEND_INTERVAL = 60000; // 1 minute - static constexpr uint8_t HCS = 4; // max 4 heating circuits + private: + static constexpr uint8_t ADDR = 0x18; + static constexpr uint32_t SEND_INTERVAL = 60000; // 1 minute + static constexpr uint8_t HCS = 4; // max 4 heating circuits - static void version(uint8_t addr, uint8_t dst); - static void unknown(uint8_t addr, uint8_t dst, uint8_t type, uint8_t offset); - static void temperature(uint8_t addr, uint8_t dst); - static void nack_write(); + static void version(uint8_t addr, uint8_t dst); + static void unknown(uint8_t addr, uint8_t dst, uint8_t type, uint8_t offset); + static void temperature(uint8_t addr, uint8_t dst); + static void nack_write(); - static bool switch_off_[HCS]; - static uint32_t rc_time_[HCS]; - static int16_t remotetemp_[HCS]; -}; + static bool switch_off_[HCS]; + static uint32_t rc_time_[HCS]; + static int16_t remotetemp_[HCS]; + }; } // namespace emsesp diff --git a/src/system.cpp b/src/system.cpp index 95a3e3286..392861e6b 100644 --- a/src/system.cpp +++ b/src/system.cpp @@ -60,8 +60,15 @@ const char * const languages[] = {EMSESP_LOCALE_EN}; #elif defined(EMSESP_DE_ONLY) const char * const languages[] = {EMSESP_LOCALE_DE}; #else -const char * const languages[] = - {EMSESP_LOCALE_EN, EMSESP_LOCALE_DE, EMSESP_LOCALE_NL, EMSESP_LOCALE_SV, EMSESP_LOCALE_PL, EMSESP_LOCALE_NO, EMSESP_LOCALE_FR, EMSESP_LOCALE_TR, EMSESP_LOCALE_IT}; +const char * const languages[] = {EMSESP_LOCALE_EN, + EMSESP_LOCALE_DE, + EMSESP_LOCALE_NL, + EMSESP_LOCALE_SV, + EMSESP_LOCALE_PL, + EMSESP_LOCALE_NO, + EMSESP_LOCALE_FR, + EMSESP_LOCALE_TR, + EMSESP_LOCALE_IT}; #endif static constexpr uint8_t NUM_LANGUAGES = sizeof(languages) / sizeof(const char *);