From eea7f2949018df45ca411f9c5bccae6b327f9f94 Mon Sep 17 00:00:00 2001 From: victor Date: Wed, 19 Jul 2017 10:10:32 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=84=EA=B8=B0=EC=8B=9D=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=86=A0=EC=BD=9C=20=EC=97=85=EB=8D=B0=EC=9D=B4?= =?UTF-8?q?=ED=8A=B8=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/udphandler.cpp | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/app/gui/oven_control/udphandler.cpp b/app/gui/oven_control/udphandler.cpp index 385894b..ee3d61c 100644 --- a/app/gui/oven_control/udphandler.cpp +++ b/app/gui/oven_control/udphandler.cpp @@ -93,35 +93,10 @@ void UdpHandler::processControl(oven_control_t *control) void UdpHandler::processState(oven_state_t *state) { - Define::config_item item = Config::getInstance()->getConfigValue(Define::config_model); - - bool isElectric = false; - switch (item.d32) + if (memcmp(&this->state, state, sizeof(this->state))) { - case Define::model_electric_10: - case Define::model_electric_20: - case Define::model_electric_24: - case Define::model_electric_40: - isElectric = true; - break; - } - - if (isElectric) - { - if (memcmp(&this->state, state, 100)) - { - memcpy(&this->state, state, 100); - bzero(((char *) &this->state) + 100, sizeof(this->state) - 100); - emit changed(); - } - } - else - { - if (memcmp(&this->state, state, sizeof(this->state))) - { - memcpy(&this->state, state, sizeof(this->state)); - emit changed(); - } + memcpy(&this->state, state, sizeof(this->state)); + emit changed(); } } -- 2.1.4