Commit b915c1b5401373a2bc5ab37787c42761f6c1a4f1

Authored by 고영탁
1 parent fb75aa5f50
Exists in master and in 2 other branches fhd, fhd-demo

팝업 처리 수정

 - 고객사 요청에 따른 에러 팝업 실행 루틴 수정
app/gui/oven_control/ovenstatics.cpp
... ... @@ -67,11 +67,13 @@ void OvenStatistics::onDataChanged()
67 67 error_item *item;
68 68 time_t ltime=0;
69 69 uint16_t errstatetemp;
  70 + uint8_t cookingstate=0;
70 71 udp->fillControl(control);
71 72 udp->fillData(state);
72 73 bDataRefreshed = true;
73 74 time(&ltime);
74 75  
  76 + if((control.cooking || oven->cooking() || oven->preheating() || oven->cooldown())) cookingstate = 1;
75 77  
76 78 if(oven->cooking() && control.system){
77 79 if(state.door_state ==1 && curdoorstate==0){
... ... @@ -84,27 +86,28 @@ void OvenStatistics::onDataChanged()
84 86 curdoorstate = state.door_state;
85 87 }
86 88  
87   -
  89 + qDebug() << "cooking state " << cookingstate << "model " << cfg->getConfigValue(Define::config_model).d32;
  90 + qDebug() << state.system_error << "and sys mask " << sys_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32];
88 91 if(state.system_error!=0 && state.system_error != curSysErrorState){
89   - processSystemError( (state.system_error & sys_err_mask[cfg->getConfigValue(Define::config_model).d32]) ,ltime);
  92 + processSystemError( (state.system_error & sys_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]) ,ltime);
90 93 }
91 94 curSysErrorState = state.system_error;
92 95  
93 96 errstatetemp = state.communication_error;
94 97 if(errstatetemp!=0 && errstatetemp != curCommErrorState ){
95   - processCommError( (errstatetemp & comm_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime );
  98 + processCommError( (errstatetemp & comm_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]),ltime );
96 99 }
97 100 curCommErrorState = errstatetemp;
98 101  
99 102 errstatetemp = state.sensor_error;
100 103 if(errstatetemp!=0 && errstatetemp != curSensorErrorState ){
101   - processSensorError( (errstatetemp& sensor_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime );
  104 + processSensorError( (errstatetemp& sensor_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]),ltime );
102 105 }
103 106 curSensorErrorState = errstatetemp;
104 107  
105 108 errstatetemp = state.controller_error;
106 109 if(errstatetemp != 0 && errstatetemp != curControlErrorState){
107   - processStateError((errstatetemp&state_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime);
  110 + processStateError((errstatetemp&state_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]),ltime);
108 111 }
109 112 curControlErrorState = errstatetemp;
110 113  
... ... @@ -605,12 +608,12 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype,
605 608 //EngineerMenuWindow *w = new EngineerMenuWindow(0);
606 609 //w->showFullScreen();
607 610 if(m_mapPopupList.find(erridx)==m_mapPopupList.end()){
608   - ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle, (errtype > error_type_clrsplit),erridx);
  611 + ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle, false,erridx);
609 612 connect(dlg,SIGNAL(closedErrorPopup(int)),this,SLOT(onErrorPopupClosed(int)));
610 613 m_mapPopupList.insert(erridx,dlg);
611 614 dlg->showFullScreen();
612 615  
613   - ServicePassInputDlg *w = new ServicePassInputDlg(pParent);
  616 + ServicePassInputDlg *w = new ServicePassInputDlg(pParent, NORMAL_SERVICE_PASS_MODE, (errtype > error_type_clrsplit));
614 617 //w->exec();
615 618 connect(dlg, SIGNAL(destroyed(QObject*)), w, SLOT(showFullScreen()));
616 619 }
... ...
app/gui/oven_control/ovenstatics.h
... ... @@ -211,9 +211,23 @@ public:
211 211  
212 212 private:
213 213  
214   - const uint32_t sys_err_mask[MAX_MODEL_COUNT] = {0x03ff, //ele_10
  214 + const uint32_t sys_err_mask[2][MAX_MODEL_COUNT] = {
  215 + {0x00f8, //ele_10
  216 + 0x00f8, //ele_20
  217 + 0x00f8, //ele_24
  218 + 0x00f8, //ele_40
  219 + 0x00f8, //lpg_10
  220 + 0x00f8, //lpg_20
  221 + 0x00f8, //lpg_24
  222 + 0x00f8, //lpg_40
  223 + 0x00f8, //lng_10
  224 + 0x00f8, //lng_20
  225 + 0x00f8, //lng_24
  226 + 0x00f8 //lng_40
  227 + },// end of noncooking state
  228 + {0x03fd, //ele_10
215 229 0x03ff, //ele_20
216   - 0x03ff, //ele_24
  230 + 0x03fd, //ele_24
217 231 0x03ff, //ele_40
218 232 0x03fd, //lpg_10
219 233 0x03ff, //lpg_20
... ... @@ -223,53 +237,110 @@ private:
223 237 0x03ff, //lng_20
224 238 0x03fd, //lng_24
225 239 0x03ff //lng_40
226   - };
227   - const uint32_t comm_err_mask[MAX_MODEL_COUNT] = {0x001f, //ele_10
  240 + },
  241 + };
  242 + const uint32_t comm_err_mask[2][MAX_MODEL_COUNT] = {
  243 + {0x000d, //ele_10
228 244 0x001f, //ele_20
229   - 0x001f, //ele_24
  245 + 0x000d, //ele_24
230 246 0x001f, //ele_40
231   - 0x001d, //lpg_10
  247 + 0x000d, //lpg_10
232 248 0x001f, //lpg_20
233   - 0x001d, //lpg_24
  249 + 0x000d, //lpg_24
234 250 0x001f, //lpg_40
235   - 0x001d, //lng_10
  251 + 0x000d, //lng_10
236 252 0x001f, //lng_20
237   - 0x001d, //lng_24
  253 + 0x000d, //lng_24
238 254 0x001f //lng_40
239   - };
240   - const uint32_t sensor_err_mask[MAX_MODEL_COUNT] = {0x0213, //ele10
241   - 0x0213, //ele 20
242   - 0x0213, //ele 24
243   - 0x0213, //ele 40
244   - 0x0213, //lpg 10
245   - 0x0213, //lpg 20
246   - 0x0213, //lpg 24
247   - 0x0213, //lpg 40
248   - 0x0213, //lng 10
249   - 0x0213, //lng 20
250   - 0x0213, //lng 24
251   - 0x0213 //lng40
252   - };
253   - const uint32_t state_err_mask[MAX_MODEL_COUNT] = {0x0018, //ele 10
254   - 0x0018, //ele 20
255   - 0x0018, //ele 24
256   - 0x0018, //ele 40
257   - 0x0018, //lpg 10
258   - 0x0018, //lpg 20
259   - 0x0018, //lpg 24
260   - 0x0018, //lpg 40
261   - 0x0018, //lng 10
262   - 0x0018, //lng 20
263   - 0x0018, //lng 24
264   - 0x0018 //lng 40
265   - };
  255 + }, // end of noncooking state
  256 + {0x000d, //ele_10
  257 + 0x001f, //ele_20
  258 + 0x000d, //ele_24
  259 + 0x001f, //ele_40
  260 + 0x000d, //lpg_10
  261 + 0x001f, //lpg_20
  262 + 0x000d, //lpg_24
  263 + 0x001f, //lpg_40
  264 + 0x000d, //lng_10
  265 + 0x001f, //lng_20
  266 + 0x000d, //lng_24
  267 + 0x001f //lng_40
  268 + }};
  269 +// const uint32_t sensor_err_mask[MAX_MODEL_COUNT] = {0x0213, //ele10
  270 +// 0x0213, //ele 20
  271 +// 0x0213, //ele 24
  272 +// 0x0213, //ele 40
  273 +// 0x0213, //lpg 10
  274 +// 0x0213, //lpg 20
  275 +// 0x0213, //lpg 24
  276 +// 0x0213, //lpg 40
  277 +// 0x0213, //lng 10
  278 +// 0x0213, //lng 20
  279 +// 0x0213, //lng 24
  280 +// 0x0213 //lng40
  281 +// };
  282 +
  283 + const uint32_t sensor_err_mask[2][MAX_MODEL_COUNT] = {
  284 + {0x03fb, //ele10
  285 + 0x03fb, //ele 20
  286 + 0x03fb, //ele 24
  287 + 0x03fb, //ele 40
  288 + 0x03fb, //lpg 10
  289 + 0x03fb, //lpg 20
  290 + 0x03fb, //lpg 24
  291 + 0x03fb, //lpg 40
  292 + 0x03fb, //lng 10
  293 + 0x03fb, //lng 20
  294 + 0x03fb, //lng 24
  295 + 0x03fb //lng40
  296 + }, // end of noncooking state
  297 + {0x03fb, //ele10
  298 + 0x03fb, //ele 20
  299 + 0x03fb, //ele 24
  300 + 0x03fb, //ele 40
  301 + 0x03fb, //lpg 10
  302 + 0x03fb, //lpg 20
  303 + 0x03fb, //lpg 24
  304 + 0x03fb, //lpg 40
  305 + 0x03fb, //lng 10
  306 + 0x03fb, //lng 20
  307 + 0x03fb, //lng 24
  308 + 0x03fb //lng40
  309 + }};
  310 + const uint32_t state_err_mask[2][MAX_MODEL_COUNT] = {
  311 + {0x000d, //ele 10
  312 + 0x001f, //ele 20
  313 + 0x000d, //ele 24
  314 + 0x001f, //ele 40
  315 + 0x000d, //lpg 10
  316 + 0x001f, //lpg 20
  317 + 0x000d, //lpg 24
  318 + 0x001f, //lpg 40
  319 + 0x000d, //lng 10
  320 + 0x001f, //lng 20
  321 + 0x000d, //lng 24
  322 + 0x001f //lng 40
  323 + }, //end of noncooking state
  324 + {0x000d, //ele 10
  325 + 0x001f, //ele 20
  326 + 0x000d, //ele 24
  327 + 0x001f, //ele 40
  328 + 0x000d, //lpg 10
  329 + 0x001f, //lpg 20
  330 + 0x000d, //lpg 24
  331 + 0x001f, //lpg 40
  332 + 0x000d, //lng 10
  333 + 0x001f, //lng 20
  334 + 0x000d, //lng 24
  335 + 0x001f //lng 40
  336 + }};
266 337  
267 338  
268 339 const error_exe_type sys_err_type_def[SYS_STATE_MAX][SYS_ERR_MAX]={ //30047
269 340 {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,
270 341 error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_OFF_COOK_OFF state
271   - {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,
272   - error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_OFF state
  342 + {error_type_onlychk,error_type_onlychk,error_type_onlychk,error_type_engclrstopcmd,error_type_engclrstopcmd,
  343 + error_type_engclrstopcmd,error_type_engclrstopcmd,error_type_engclrstopcmd,error_type_onlychk,error_type_onlychk}, // SYS_ON_COOK_OFF state
273 344 {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,
274 345 error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_ON state
275 346 {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,
... ... @@ -293,10 +364,10 @@ private:
293 364 const error_exe_type sensor_err_type_def[SYS_STATE_MAX][SENSOR_ERR_MAX]={ //30049
294 365 {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk,
295 366 error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_OFF_COOK_OFF state
296   - {error_type_engclrstopcmd,error_type_popclrstopcmd,error_type_allnone,error_type_popclrstopcmd,error_type_popclrstopcmd,
297   - error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_ON_COOK_OFF state
298 367 {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_allnone,error_type_popclrstopcmd,error_type_popclrstopcmd,
299   - error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_ON_COOK_ON state
  368 + error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_OFF state
  369 + {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_allnone,error_type_popclrstopcmd,error_type_popclrstopcmd,
  370 + error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_ON state
300 371 {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk,
301 372 error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_OFF_COOK_ON state same with SYS_OFF_COOK_OFF
302 373 };
... ...
app/gui/oven_control/servicepassinputdlg.cpp
... ... @@ -3,9 +3,10 @@
3 3 #include "engineermenuwindow.h"
4 4 #include <QDebug>
5 5 #include "soundplayer.h"
  6 +#include "udphandler.h"
6 7  
7 8  
8   -ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode) :
  9 +ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode, bool sendClrCmd) :
9 10 QDialog(parent),
10 11 ui(new Ui::ServicePassInputDlg)
11 12 {
... ... @@ -29,6 +30,7 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode
29 30 connect(ui->keyboardwidget,SIGNAL(onKeyboardClickSignal(QString)),SLOT(keyboardInputEvent(QString)));
30 31 ui->keyboardwidget->focusInKeyboard();
31 32 m_nMode = mode;
  33 + m_bSendClrCmd = sendClrCmd;
32 34 }
33 35  
34 36 ServicePassInputDlg::~ServicePassInputDlg()
... ... @@ -41,6 +43,7 @@ void ServicePassInputDlg::on_ctrBtnOk_clicked()
41 43  
42 44 if( QString(m_strInputPass) == QString(NORMAL_PASS_WORD) && m_nMode == NORMAL_SERVICE_PASS_MODE){
43 45 qDebug() << this->parentWidget() <<this->parent();
  46 + if(m_bSendClrCmd) UdpHandler::getInstance()->set(TG_ERROR_CLEAR,0xCECE);
44 47 EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget());
45 48 connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close()));
46 49 w->setWindowModality(Qt::WindowModal);
... ...
app/gui/oven_control/servicepassinputdlg.h
... ... @@ -27,7 +27,7 @@ class ServicePassInputDlg : public QDialog
27 27 QChar m_strInputPass[MAX_PASSWORD+1];
28 28  
29 29 public:
30   - explicit ServicePassInputDlg(QWidget *parent = 0, service_pass_type mode = NORMAL_SERVICE_PASS_MODE );
  30 + explicit ServicePassInputDlg(QWidget *parent = 0, service_pass_type mode = NORMAL_SERVICE_PASS_MODE, bool sendClrCmd = false );
31 31 ~ServicePassInputDlg();
32 32  
33 33 private slots:
... ... @@ -49,6 +49,7 @@ private:
49 49 Ui::ServicePassInputDlg *ui;
50 50 int m_nCurInputCount;
51 51 service_pass_type m_nMode;
  52 + bool m_bSendClrCmd;
52 53 };
53 54  
54 55 #endif // SERVICEPASSINPUTDLG_H
... ...