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