add brackets to make logic clear

This commit is contained in:
MichaelDvP
2024-01-24 11:10:16 +01:00
parent 6aca61deee
commit 1042298541

View File

@@ -963,8 +963,9 @@ bool EMSESP::process_telegram(std::shared_ptr<const Telegram> telegram) {
if (!telegram_found && telegram->message_length > 0) {
emsdevice->add_handlers_ignored(telegram->type_id);
}
if (Mqtt::connected() && telegram_found && (mqtt_.get_publish_onchange(emsdevice->device_type()) && emsdevice->has_update())
|| (telegram->type_id == publish_id_ && telegram->dest == EMSbus::ems_bus_id())) {
if (Mqtt::connected() && telegram_found
&& ((mqtt_.get_publish_onchange(emsdevice->device_type()) && emsdevice->has_update())
|| (telegram->type_id == publish_id_ && telegram->dest == EMSbus::ems_bus_id()))) {
if (telegram->type_id == publish_id_) {
publish_id_ = 0;
}