Commit eea7f2949018df45ca411f9c5bccae6b327f9f94
1 parent
15eb2352d8
Exists in
master
and in
2 other branches
전기식 프로토콜 업데이트 반영
Showing
1 changed file
with
3 additions
and
28 deletions
Show diff stats
app/gui/oven_control/udphandler.cpp
@@ -93,35 +93,10 @@ void UdpHandler::processControl(oven_control_t *control) | @@ -93,35 +93,10 @@ void UdpHandler::processControl(oven_control_t *control) | ||
93 | 93 | ||
94 | void UdpHandler::processState(oven_state_t *state) | 94 | void UdpHandler::processState(oven_state_t *state) |
95 | { | 95 | { |
96 | - Define::config_item item = Config::getInstance()->getConfigValue(Define::config_model); | ||
97 | - | ||
98 | - bool isElectric = false; | ||
99 | - switch (item.d32) | 96 | + if (memcmp(&this->state, state, sizeof(this->state))) |
100 | { | 97 | { |
101 | - case Define::model_electric_10: | ||
102 | - case Define::model_electric_20: | ||
103 | - case Define::model_electric_24: | ||
104 | - case Define::model_electric_40: | ||
105 | - isElectric = true; | ||
106 | - break; | ||
107 | - } | ||
108 | - | ||
109 | - if (isElectric) | ||
110 | - { | ||
111 | - if (memcmp(&this->state, state, 100)) | ||
112 | - { | ||
113 | - memcpy(&this->state, state, 100); | ||
114 | - bzero(((char *) &this->state) + 100, sizeof(this->state) - 100); | ||
115 | - emit changed(); | ||
116 | - } | ||
117 | - } | ||
118 | - else | ||
119 | - { | ||
120 | - if (memcmp(&this->state, state, sizeof(this->state))) | ||
121 | - { | ||
122 | - memcpy(&this->state, state, sizeof(this->state)); | ||
123 | - emit changed(); | ||
124 | - } | 98 | + memcpy(&this->state, state, sizeof(this->state)); |
99 | + emit changed(); | ||
125 | } | 100 | } |
126 | } | 101 | } |
127 | 102 |