style: auto formatting

This commit is contained in:
proddy
2021-03-30 17:58:49 +02:00
parent 108f236874
commit 9787d1686f
6 changed files with 11 additions and 21 deletions

View File

@@ -43,6 +43,7 @@ using uuid::log::Level;
#define LOG_NOTICE(...) logger_.notice(__VA_ARGS__) #define LOG_NOTICE(...) logger_.notice(__VA_ARGS__)
#define LOG_WARNING(...) logger_.warning(__VA_ARGS__) #define LOG_WARNING(...) logger_.warning(__VA_ARGS__)
#define LOG_ERROR(...) logger_.err(__VA_ARGS__) #define LOG_ERROR(...) logger_.err(__VA_ARGS__)
#define MQTT_TOPIC(list_name) (__pstr__##list_name[0]) #define MQTT_TOPIC(list_name) (__pstr__##list_name[0])
// clang-format off // clang-format off

View File

@@ -274,7 +274,7 @@ void Boiler::check_active(const bool force) {
// Boiler(0x08) -> Me(0x0B), UBAParameterWW(0x33), data: 08 FF 30 FB FF 28 FF 07 46 00 00 // Boiler(0x08) -> Me(0x0B), UBAParameterWW(0x33), data: 08 FF 30 FB FF 28 FF 07 46 00 00
void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) { void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) {
// has_update(telegram->read_bitvalue(wwEquipt_,0,3)); // 8=boiler has ww // has_update(telegram->read_bitvalue(wwEquipt_,0,3)); // 8=boiler has ww
has_update(telegram->read_value(wWActivated_, 1)); // 0xFF means on has_update(telegram->read_value(wWActivated_, 1)); // 0xFF means on
has_update(telegram->read_value(wWSelTemp_, 2)); has_update(telegram->read_value(wWSelTemp_, 2));
// has_update(telegram->read_value(wW?_, 3)); // Hyst on (default -5) // has_update(telegram->read_value(wW?_, 3)); // Hyst on (default -5)
// has_update(telegram->read_value(wW?_, 4)); // (0xFF) Maybe: Hyst off -1? // has_update(telegram->read_value(wW?_, 4)); // (0xFF) Maybe: Hyst off -1?
@@ -282,7 +282,7 @@ void Boiler::process_UBAParameterWW(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(wWCircPump_, 6)); // 0xFF means on has_update(telegram->read_value(wWCircPump_, 6)); // 0xFF means on
has_update(telegram->read_value(wWCircMode_, 7)); // 1=1x3min 6=6x3min 7=continuous has_update(telegram->read_value(wWCircMode_, 7)); // 1=1x3min 6=6x3min 7=continuous
has_update(telegram->read_value(wWDisinfectionTemp_, 8)); has_update(telegram->read_value(wWDisinfectionTemp_, 8));
has_update(telegram->read_value(wWChargeType_, 10)); // 0 = charge pump, 0xff = 3-way valve has_update(telegram->read_value(wWChargeType_, 10)); // 0 = charge pump, 0xff = 3-way valve
telegram->read_value(wWComfort_, 9); telegram->read_value(wWComfort_, 9);
if (wWComfort_ == 0x00) { if (wWComfort_ == 0x00) {
@@ -507,9 +507,9 @@ void Boiler::process_UBAParametersPlus(std::shared_ptr<const Telegram> telegram)
// 0xEA // 0xEA
void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram) { void Boiler::process_UBAParameterWWPlus(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(wWActivated_, 5)); // 0x01 means on has_update(telegram->read_value(wWActivated_, 5)); // 0x01 means on
has_update(telegram->read_value(wWCircPump_, 10)); // 0x01 means yes has_update(telegram->read_value(wWCircPump_, 10)); // 0x01 means yes
has_update(telegram->read_value(wWCircMode_, 11)); // 1=1x3min... 6=6x3min, 7=continuous has_update(telegram->read_value(wWCircMode_, 11)); // 1=1x3min... 6=6x3min, 7=continuous
// has_update(telegram->read_value(wWDisinfectTemp_, 12)); // settings, status in E9 // has_update(telegram->read_value(wWDisinfectTemp_, 12)); // settings, status in E9
// has_update(telegram->read_value(wWSelTemp_, 6)); // settings, status in E9 // has_update(telegram->read_value(wWSelTemp_, 6)); // settings, status in E9
} }

View File

@@ -162,7 +162,6 @@ void Mixer::process_IPMStatusMessage(std::shared_ptr<const Telegram> telegram) {
// Mixer IPM - 0x001E Temperature Message in unmixed circuits // Mixer IPM - 0x001E Temperature Message in unmixed circuits
// in unmixed circuits FlowTemp in 10C is zero, this is the measured flowtemp in header // in unmixed circuits FlowTemp in 10C is zero, this is the measured flowtemp in header
void Mixer::process_IPMTempMessage(std::shared_ptr<const Telegram> telegram) { void Mixer::process_IPMTempMessage(std::shared_ptr<const Telegram> telegram) {
has_update(telegram->read_value(flowTempVf_, 0)); // TC1, is * 10 has_update(telegram->read_value(flowTempVf_, 0)); // TC1, is * 10
} }

View File

@@ -1343,8 +1343,8 @@ bool Thermostat::set_pause(const char * value, const int8_t id) {
// set partymode in hours // set partymode in hours
bool Thermostat::set_party(const char * value, const int8_t id) { bool Thermostat::set_party(const char * value, const int8_t id) {
uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id; uint8_t hc_num = (id == -1) ? AUTO_HEATING_CIRCUIT : id;
std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num); std::shared_ptr<Thermostat::HeatingCircuit> hc = heating_circuit(hc_num);
if (hc == nullptr) { if (hc == nullptr) {
LOG_WARNING(F("Set party: Heating Circuit %d not found or activated for device ID 0x%02X"), hc_num, device_id()); LOG_WARNING(F("Set party: Heating Circuit %d not found or activated for device ID 0x%02X"), hc_num, device_id());
return false; return false;

View File

@@ -139,12 +139,7 @@ enum DeviceValueTAG : uint8_t {
}; };
// mqtt flags for command subscriptions // mqtt flags for command subscriptions
enum MqttSubFlag : uint8_t { enum MqttSubFlag : uint8_t { FLAG_NORMAL = 0, FLAG_HC, FLAG_WWC, FLAG_NOSUB };
FLAG_NORMAL = 0,
FLAG_HC,
FLAG_WWC,
FLAG_NOSUB
};
class EMSdevice { class EMSdevice {
public: public:
@@ -276,12 +271,7 @@ class EMSdevice {
const __FlashStringHelper * full_name, const __FlashStringHelper * full_name,
uint8_t uom = DeviceValueUOM::NONE); uint8_t uom = DeviceValueUOM::NONE);
void register_device_value(uint8_t tag, void register_device_value(uint8_t tag, void * value_p, uint8_t type, const __FlashStringHelper * const * options, const __FlashStringHelper * const * name, uint8_t uom = DeviceValueUOM::NONE);
void * value_p,
uint8_t type,
const __FlashStringHelper * const * options,
const __FlashStringHelper * const * name,
uint8_t uom = DeviceValueUOM::NONE);
void write_command(const uint16_t type_id, const uint8_t offset, uint8_t * message_data, const uint8_t message_length, const uint16_t validate_typeid); void write_command(const uint16_t type_id, const uint8_t offset, uint8_t * message_data, const uint8_t message_length, const uint16_t validate_typeid);
void write_command(const uint16_t type_id, const uint8_t offset, const uint8_t value, const uint16_t validate_typeid); void write_command(const uint16_t type_id, const uint8_t offset, const uint8_t value, const uint16_t validate_typeid);
void write_command(const uint16_t type_id, const uint8_t offset, const uint8_t value); void write_command(const uint16_t type_id, const uint8_t offset, const uint8_t value);

View File

@@ -376,7 +376,7 @@ void Mqtt::on_message(const char * fulltopic, const char * payload, size_t len)
} else if (data.isNull()) { } else if (data.isNull()) {
DynamicJsonDocument resp(EMSESP_JSON_SIZE_XLARGE_DYN); DynamicJsonDocument resp(EMSESP_JSON_SIZE_XLARGE_DYN);
JsonObject json = resp.to<JsonObject>(); JsonObject json = resp.to<JsonObject>();
cmd_known = Command::call(mf.device_type_, command, "", n, json); cmd_known = Command::call(mf.device_type_, command, "", n, json);
if (cmd_known && json.size()) { if (cmd_known && json.size()) {
Mqtt::publish(F("response"), resp.as<JsonObject>()); Mqtt::publish(F("response"), resp.as<JsonObject>());
} }