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();