From 38bd9e271739aea7b0ab6881ae53f7c20fe6e267 Mon Sep 17 00:00:00 2001 From: taehoon Date: Fri, 18 Jun 2021 14:49:37 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=90=ED=99=94=20=EC=95=84=EC=9D=B4?= =?UTF-8?q?=EC=BD=98=20=ED=91=9C=EC=8B=9C=20=EC=97=AC=EB=B6=80=EB=A5=BC=20?= =?UTF-8?q?=EC=A0=84=EA=B8=B0=EC=8B=9D/=EA=B0=80=EC=8A=A4=EC=8B=9D?= =?UTF-8?q?=EC=97=90=20=EB=94=B0=EB=9D=BC=20=EB=8B=A4=EB=A5=B4=EA=B2=8C=20?= =?UTF-8?q?=ED=8C=90=EB=B3=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/ignitionicon.cpp | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/app/gui/oven_control/ignitionicon.cpp b/app/gui/oven_control/ignitionicon.cpp index e163f49..aa66381 100644 --- a/app/gui/oven_control/ignitionicon.cpp +++ b/app/gui/oven_control/ignitionicon.cpp @@ -1,6 +1,7 @@ #include "ignitionicon.h" #include "udphandler.h" +#include "config.h" QPixmap *IgnitionIcon::icon = Q_NULLPTR; @@ -16,8 +17,33 @@ IgnitionIcon::IgnitionIcon(QWidget *parent) : QLabel(parent) void IgnitionIcon::check() { + bool ignition = false; + UdpHandler *udp = UdpHandler::getInstance(); - if (udp->burnerState(1) || udp->burnerState(2) || udp->burnerState(3) || udp->heater()) + + switch (Config::getInstance()->getConfigValue(Define::config_model).d32) + { + case Define::model_electric_10: + case Define::model_electric_20: + case Define::model_electric_24: + case Define::model_electric_40: + ignition = udp->heater(); + break; + + case Define::model_gas_lpg_10: + case Define::model_gas_lpg_20: + case Define::model_gas_lpg_24: + case Define::model_gas_lpg_40: + + case Define::model_gas_lng_10: + case Define::model_gas_lng_20: + case Define::model_gas_lng_24: + case Define::model_gas_lng_40: + ignition = udp->burnerState(1) || udp->burnerState(2) || udp->burnerState(3); + break; + } + + if (ignition) show(); else hide(); -- 2.1.4