From 696cfc041531f5a880a86cd348b1934f1bb12049 Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Wed, 24 Apr 2024 07:56:29 +0200 Subject: [PATCH] fix burnpower min>max, #1703 --- src/devices/boiler.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/devices/boiler.cpp b/src/devices/boiler.cpp index cca692f2a..338fe5dfb 100644 --- a/src/devices/boiler.cpp +++ b/src/devices/boiler.cpp @@ -1163,10 +1163,12 @@ void Boiler::process_UBAFactory(std::shared_ptr telegram) { if (nomPower > 0 && nomPower_ == 0) { has_update(nomPower_, nomPower); } - set_minmax(&burnMinPower_, 0, max); - set_minmax(&burnMaxPower_, min, max); - set_minmax(&wwMaxPower_, min, max); - set_minmax(&selBurnPow_, 0, max); + if (min <= max) { + set_minmax(&burnMinPower_, 0, max); + set_minmax(&burnMaxPower_, min, max); + set_minmax(&wwMaxPower_, min, max); + set_minmax(&selBurnPow_, 0, max); + } } // 0x18