diff --git a/app/gui/oven_control/ovenstatics.cpp b/app/gui/oven_control/ovenstatics.cpp index 61ce2c4..9e1e744 100644 --- a/app/gui/oven_control/ovenstatics.cpp +++ b/app/gui/oven_control/ovenstatics.cpp @@ -22,6 +22,7 @@ OvenStatistics* OvenStatistics::getInstance(QObject *parent){ // MainWindow* mw = (MainWindow*)parent; // connect(mw->pcombiButton, SIGNAL(clicked()),p_singtonInstance, SLOT(onDataChanged())); connect(p_singletonInstance->udp , SIGNAL(changed()), p_singletonInstance, SLOT(onDataChanged())); + connect(p_singletonInstance->udp, SIGNAL(timeout()), p_singletonInstance, SLOT(onCommTimeoutFired())); QTimer *timer = new QTimer(p_singletonInstance); connect(timer, SIGNAL(timeout()),p_singletonInstance,SLOT(oneSecTimerFired())); timer->start(1000); //1000ms fired @@ -359,9 +360,9 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_SPLY_FAIL],strMsg,strTitle,ltime, sys_err_sound_def[SYS_ERR_WATER_SPLY_FAIL]); } if(errflag & MAKE_MASK(SYS_ERR_WATER_LEVEL_FAIL)){ - //급수 이상 -> 수위 센서 이상 + //급수 이상 -> 수위 상태 확인 item = &(srvdata->err_log.items.water_level_sensor_fail); - strTitle = tr("수위 센서 이상"); + strTitle = tr("수위 상태 확인"); strMsg = tr("스팀통 수위 감지 안전장치가 작동하였습니다.\n제품에 들어가는 물 공급을 확인하십시오.\n물 공급이 정상적으로 들어갈 시 즉시 서비스센터에 연락하여 주십시오.\n단수 유무는 샤워건을 사용하십시오."); processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_LEVEL_FAIL],strMsg,strTitle,ltime, sys_err_sound_def[SYS_ERR_WATER_LEVEL_FAIL]); } @@ -645,7 +646,11 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, if(errtype>=error_type_chkclrstopcmd){ qDebug() << "exec killchild"; - if(MainWindow::killChildCook()){ + if(state.cleaning_sate != 0){ + emit stopClean(); + pParent = QApplication::activeWindow(); + } + else if(MainWindow::killChildCook()){ pParent = MainWindow::getInstance(); } else{ @@ -663,7 +668,7 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, case error_type_popclr: case error_type_popnonclr: case error_type_popclrstopcmd: - { + { if(m_mapPopupList.find(erridx) == m_mapPopupList.end()){ ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle , (errtype > error_type_clrsplit), erridx, sndtype); connect(dlg,SIGNAL(closedErrorPopup(int)), this, SLOT(onErrorPopupClosed(int))); @@ -738,3 +743,27 @@ void OvenStatistics::onErrorPopupClosed(int erridx){ m_mapPopupList.remove(erridx); } } + +void OvenStatistics::onCommTimeoutFired() +{ + QWidget* pParent; + int erridx = MAX_ERROR_TYPE_CNT; + HACCP::error(tr("제어보드 통신에러 발생")); + + qDebug() << "exec killchild"; + if(MainWindow::killChildCook()){ + pParent = MainWindow::getInstance(); + } + else{ + pParent = QApplication::activeWindow(); + } + + if(m_mapPopupList.find(erridx) == m_mapPopupList.end()){ + ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,tr("제어보드 통신에러 발생"), tr("제어보드 통신에러 발생하였습니다"), + 0, erridx, 1); + connect(dlg,SIGNAL(closedErrorPopup(int)), this, SLOT(onErrorPopupClosed(int))); + m_mapPopupList.insert(erridx,dlg); + qApp->setActiveWindow(dlg); + dlg->showFullScreen(); + } +} diff --git a/app/gui/oven_control/ovenstatics.h b/app/gui/oven_control/ovenstatics.h index 23d7e46..c32f5b2 100644 --- a/app/gui/oven_control/ovenstatics.h +++ b/app/gui/oven_control/ovenstatics.h @@ -224,18 +224,18 @@ private: */ //30047 const uint32_t sys_err_mask[3][MAX_MODEL_COUNT] = { - {0x0198, //ele_10 - 0x0198, //ele_20 - 0x0198, //ele_24 - 0x0198, //ele_40 - 0x0198, //lpg_10 - 0x0198, //lpg_20 - 0x0198, //lpg_24 - 0x0198, //lpg_40 - 0x0198, //lng_10 - 0x0198, //lng_20 - 0x0198, //lng_24 - 0x0198 //lng_40 + {0x0098, //ele_10 + 0x0098, //ele_20 + 0x0098, //ele_24 + 0x0098, //ele_40 + 0x0098, //lpg_10 + 0x0098, //lpg_20 + 0x0098, //lpg_24 + 0x0098, //lpg_40 + 0x0098, //lng_10 + 0x0098, //lng_20 + 0x0098, //lng_24 + 0x0098 //lng_40 },// noncooking state {0x039d, //ele_10 0x039f, //ele_20 @@ -524,9 +524,12 @@ public slots: void oneSecTimerFired(void); void onErrorPopupClosed(int erridx); void setWndPassInputNull(void){m_wndSrvpassdlg = NULL;} + void onCommTimeoutFired(); signals: void onErrorFired(int erridx); + void stopClean(void); + }; #endif // OVENSTATICS_H