Commit 703618ec34ecd6e88edbfc273cec83ec35559df9

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

세척 상황에서 에러 발생시 이벤트 발생 알림으로 수정

- ovenstatics에 stopClean signal 추가
app/gui/oven_control/ovenstatics.cpp
@@ -22,6 +22,7 @@ OvenStatistics* OvenStatistics::getInstance(QObject *parent){ @@ -22,6 +22,7 @@ OvenStatistics* OvenStatistics::getInstance(QObject *parent){
22 // MainWindow* mw = (MainWindow*)parent; 22 // MainWindow* mw = (MainWindow*)parent;
23 // connect(mw->pcombiButton, SIGNAL(clicked()),p_singtonInstance, SLOT(onDataChanged())); 23 // connect(mw->pcombiButton, SIGNAL(clicked()),p_singtonInstance, SLOT(onDataChanged()));
24 connect(p_singletonInstance->udp , SIGNAL(changed()), p_singletonInstance, SLOT(onDataChanged())); 24 connect(p_singletonInstance->udp , SIGNAL(changed()), p_singletonInstance, SLOT(onDataChanged()));
  25 + connect(p_singletonInstance->udp, SIGNAL(timeout()), p_singletonInstance, SLOT(onCommTimeoutFired()));
25 QTimer *timer = new QTimer(p_singletonInstance); 26 QTimer *timer = new QTimer(p_singletonInstance);
26 connect(timer, SIGNAL(timeout()),p_singletonInstance,SLOT(oneSecTimerFired())); 27 connect(timer, SIGNAL(timeout()),p_singletonInstance,SLOT(oneSecTimerFired()));
27 timer->start(1000); //1000ms fired 28 timer->start(1000); //1000ms fired
@@ -359,9 +360,9 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ @@ -359,9 +360,9 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){
359 processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_SPLY_FAIL],strMsg,strTitle,ltime, sys_err_sound_def[SYS_ERR_WATER_SPLY_FAIL]); 360 processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_SPLY_FAIL],strMsg,strTitle,ltime, sys_err_sound_def[SYS_ERR_WATER_SPLY_FAIL]);
360 } 361 }
361 if(errflag & MAKE_MASK(SYS_ERR_WATER_LEVEL_FAIL)){ 362 if(errflag & MAKE_MASK(SYS_ERR_WATER_LEVEL_FAIL)){
362 - //급수 이상 -> 수위 센서 이상 363 + //급수 이상 -> 수위 상태 확인
363 item = &(srvdata->err_log.items.water_level_sensor_fail); 364 item = &(srvdata->err_log.items.water_level_sensor_fail);
364 - strTitle = tr("수위 센서 이상"); 365 + strTitle = tr("수위 상태 확인");
365 strMsg = tr("스팀통 수위 감지 안전장치가 작동하였습니다.\n제품에 들어가는 물 공급을 확인하십시오.\n물 공급이 정상적으로 들어갈 시 즉시 서비스센터에 연락하여 주십시오.\n단수 유무는 샤워건을 사용하십시오."); 366 strMsg = tr("스팀통 수위 감지 안전장치가 작동하였습니다.\n제품에 들어가는 물 공급을 확인하십시오.\n물 공급이 정상적으로 들어갈 시 즉시 서비스센터에 연락하여 주십시오.\n단수 유무는 샤워건을 사용하십시오.");
366 processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_LEVEL_FAIL],strMsg,strTitle,ltime, sys_err_sound_def[SYS_ERR_WATER_LEVEL_FAIL]); 367 processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_LEVEL_FAIL],strMsg,strTitle,ltime, sys_err_sound_def[SYS_ERR_WATER_LEVEL_FAIL]);
367 } 368 }
@@ -645,7 +646,11 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, @@ -645,7 +646,11 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype,
645 646
646 if(errtype>=error_type_chkclrstopcmd){ 647 if(errtype>=error_type_chkclrstopcmd){
647 qDebug() << "exec killchild"; 648 qDebug() << "exec killchild";
648 - if(MainWindow::killChildCook()){ 649 + if(state.cleaning_sate != 0){
  650 + emit stopClean();
  651 + pParent = QApplication::activeWindow();
  652 + }
  653 + else if(MainWindow::killChildCook()){
649 pParent = MainWindow::getInstance(); 654 pParent = MainWindow::getInstance();
650 } 655 }
651 else{ 656 else{
@@ -663,7 +668,7 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, @@ -663,7 +668,7 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype,
663 case error_type_popclr: 668 case error_type_popclr:
664 case error_type_popnonclr: 669 case error_type_popnonclr:
665 case error_type_popclrstopcmd: 670 case error_type_popclrstopcmd:
666 - { 671 + {
667 if(m_mapPopupList.find(erridx) == m_mapPopupList.end()){ 672 if(m_mapPopupList.find(erridx) == m_mapPopupList.end()){
668 ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle , (errtype > error_type_clrsplit), erridx, sndtype); 673 ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle , (errtype > error_type_clrsplit), erridx, sndtype);
669 connect(dlg,SIGNAL(closedErrorPopup(int)), this, SLOT(onErrorPopupClosed(int))); 674 connect(dlg,SIGNAL(closedErrorPopup(int)), this, SLOT(onErrorPopupClosed(int)));
@@ -738,3 +743,27 @@ void OvenStatistics::onErrorPopupClosed(int erridx){ @@ -738,3 +743,27 @@ void OvenStatistics::onErrorPopupClosed(int erridx){
738 m_mapPopupList.remove(erridx); 743 m_mapPopupList.remove(erridx);
739 } 744 }
740 } 745 }
  746 +
  747 +void OvenStatistics::onCommTimeoutFired()
  748 +{
  749 + QWidget* pParent;
  750 + int erridx = MAX_ERROR_TYPE_CNT;
  751 + HACCP::error(tr("제어보드 통신에러 발생"));
  752 +
  753 + qDebug() << "exec killchild";
  754 + if(MainWindow::killChildCook()){
  755 + pParent = MainWindow::getInstance();
  756 + }
  757 + else{
  758 + pParent = QApplication::activeWindow();
  759 + }
  760 +
  761 + if(m_mapPopupList.find(erridx) == m_mapPopupList.end()){
  762 + ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,tr("제어보드 통신에러 발생"), tr("제어보드 통신에러 발생하였습니다"),
  763 + 0, erridx, 1);
  764 + connect(dlg,SIGNAL(closedErrorPopup(int)), this, SLOT(onErrorPopupClosed(int)));
  765 + m_mapPopupList.insert(erridx,dlg);
  766 + qApp->setActiveWindow(dlg);
  767 + dlg->showFullScreen();
  768 + }
  769 +}
app/gui/oven_control/ovenstatics.h
@@ -224,18 +224,18 @@ private: @@ -224,18 +224,18 @@ private:
224 */ 224 */
225 //30047 225 //30047
226 const uint32_t sys_err_mask[3][MAX_MODEL_COUNT] = { 226 const uint32_t sys_err_mask[3][MAX_MODEL_COUNT] = {
227 - {0x0198, //ele_10  
228 - 0x0198, //ele_20  
229 - 0x0198, //ele_24  
230 - 0x0198, //ele_40  
231 - 0x0198, //lpg_10  
232 - 0x0198, //lpg_20  
233 - 0x0198, //lpg_24  
234 - 0x0198, //lpg_40  
235 - 0x0198, //lng_10  
236 - 0x0198, //lng_20  
237 - 0x0198, //lng_24  
238 - 0x0198 //lng_40 227 + {0x0098, //ele_10
  228 + 0x0098, //ele_20
  229 + 0x0098, //ele_24
  230 + 0x0098, //ele_40
  231 + 0x0098, //lpg_10
  232 + 0x0098, //lpg_20
  233 + 0x0098, //lpg_24
  234 + 0x0098, //lpg_40
  235 + 0x0098, //lng_10
  236 + 0x0098, //lng_20
  237 + 0x0098, //lng_24
  238 + 0x0098 //lng_40
239 },// noncooking state 239 },// noncooking state
240 {0x039d, //ele_10 240 {0x039d, //ele_10
241 0x039f, //ele_20 241 0x039f, //ele_20
@@ -524,9 +524,12 @@ public slots: @@ -524,9 +524,12 @@ public slots:
524 void oneSecTimerFired(void); 524 void oneSecTimerFired(void);
525 void onErrorPopupClosed(int erridx); 525 void onErrorPopupClosed(int erridx);
526 void setWndPassInputNull(void){m_wndSrvpassdlg = NULL;} 526 void setWndPassInputNull(void){m_wndSrvpassdlg = NULL;}
  527 + void onCommTimeoutFired();
527 528
528 signals: 529 signals:
529 void onErrorFired(int erridx); 530 void onErrorFired(int erridx);
  531 + void stopClean(void);
  532 +
530 }; 533 };
531 534
532 #endif // OVENSTATICS_H 535 #endif // OVENSTATICS_H