diff --git a/app/gui/oven_control/ovenstatics.cpp b/app/gui/oven_control/ovenstatics.cpp
index 5959bfa..4dfc125 100644
--- a/app/gui/oven_control/ovenstatics.cpp
+++ b/app/gui/oven_control/ovenstatics.cpp
@@ -67,11 +67,13 @@ void OvenStatistics::onDataChanged()
     error_item *item;
     time_t ltime=0;
     uint16_t errstatetemp;
+    uint8_t cookingstate=0;
     udp->fillControl(control);
     udp->fillData(state);
     bDataRefreshed = true;
     time(&ltime);
 
+    if((control.cooking || oven->cooking() || oven->preheating() || oven->cooldown())) cookingstate = 1;
 
     if(oven->cooking() && control.system){
         if(state.door_state ==1 && curdoorstate==0){
@@ -84,27 +86,28 @@ void OvenStatistics::onDataChanged()
         curdoorstate = state.door_state;
     }
 
-
+    qDebug() << "cooking state " << cookingstate << "model " << cfg->getConfigValue(Define::config_model).d32;
+    qDebug() << state.system_error << "and sys mask " << sys_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32];
     if(state.system_error!=0 &&  state.system_error != curSysErrorState){
-        processSystemError( (state.system_error & sys_err_mask[cfg->getConfigValue(Define::config_model).d32]) ,ltime);
+        processSystemError( (state.system_error & sys_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]) ,ltime);
     }
     curSysErrorState = state.system_error;
 
     errstatetemp = state.communication_error;
     if(errstatetemp!=0 && errstatetemp != curCommErrorState ){
-        processCommError( (errstatetemp & comm_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime );
+        processCommError( (errstatetemp & comm_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]),ltime );
     }
     curCommErrorState = errstatetemp;
 
     errstatetemp = state.sensor_error;
     if(errstatetemp!=0 && errstatetemp != curSensorErrorState ){
-        processSensorError( (errstatetemp& sensor_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime );
+        processSensorError( (errstatetemp& sensor_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]),ltime );
     }
     curSensorErrorState = errstatetemp;
 
     errstatetemp = state.controller_error;
     if(errstatetemp != 0 && errstatetemp != curControlErrorState){
-        processStateError((errstatetemp&state_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime);
+        processStateError((errstatetemp&state_err_mask[cookingstate][cfg->getConfigValue(Define::config_model).d32]),ltime);
     }
     curControlErrorState = errstatetemp;
 
@@ -605,12 +608,12 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype,
                 //EngineerMenuWindow *w = new EngineerMenuWindow(0);
                 //w->showFullScreen();
                 if(m_mapPopupList.find(erridx)==m_mapPopupList.end()){
-                    ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle, (errtype > error_type_clrsplit),erridx);
+                    ErrorPopupDlg *dlg = new ErrorPopupDlg(pParent,MsgDesc,MsgTitle, false,erridx);
                     connect(dlg,SIGNAL(closedErrorPopup(int)),this,SLOT(onErrorPopupClosed(int)));
                     m_mapPopupList.insert(erridx,dlg);
                     dlg->showFullScreen();
 
-                    ServicePassInputDlg *w = new ServicePassInputDlg(pParent);
+                    ServicePassInputDlg *w = new ServicePassInputDlg(pParent, NORMAL_SERVICE_PASS_MODE, (errtype > error_type_clrsplit));
                     //w->exec();
                     connect(dlg, SIGNAL(destroyed(QObject*)), w, SLOT(showFullScreen()));
                  }
diff --git a/app/gui/oven_control/ovenstatics.h b/app/gui/oven_control/ovenstatics.h
index 153330d..90fa2c8 100644
--- a/app/gui/oven_control/ovenstatics.h
+++ b/app/gui/oven_control/ovenstatics.h
@@ -211,9 +211,23 @@ public:
 
 private:
 
-    const uint32_t sys_err_mask[MAX_MODEL_COUNT] =          {0x03ff, //ele_10
+    const uint32_t sys_err_mask[2][MAX_MODEL_COUNT] = {
+                                                             {0x00f8, //ele_10
+                                                             0x00f8, //ele_20
+                                                             0x00f8, //ele_24
+                                                             0x00f8, //ele_40
+                                                             0x00f8, //lpg_10
+                                                             0x00f8, //lpg_20
+                                                             0x00f8, //lpg_24
+                                                             0x00f8, //lpg_40
+                                                             0x00f8, //lng_10
+                                                             0x00f8, //lng_20
+                                                             0x00f8, //lng_24
+                                                             0x00f8 //lng_40
+                                                            },// end of noncooking state
+                                                            {0x03fd, //ele_10
                                                              0x03ff, //ele_20
-                                                             0x03ff, //ele_24
+                                                             0x03fd, //ele_24
                                                              0x03ff, //ele_40
                                                              0x03fd, //lpg_10
                                                              0x03ff, //lpg_20
@@ -223,53 +237,110 @@ private:
                                                              0x03ff, //lng_20
                                                              0x03fd, //lng_24
                                                              0x03ff //lng_40
-                                                            };
-    const uint32_t comm_err_mask[MAX_MODEL_COUNT] =    {0x001f, //ele_10
+                                                            },
+                                                             };
+    const uint32_t comm_err_mask[2][MAX_MODEL_COUNT] =    {
+                                                       {0x000d, //ele_10
                                                         0x001f, //ele_20
-                                                        0x001f, //ele_24
+                                                        0x000d, //ele_24
                                                         0x001f, //ele_40
-                                                        0x001d, //lpg_10
+                                                        0x000d, //lpg_10
                                                         0x001f, //lpg_20
-                                                        0x001d, //lpg_24
+                                                        0x000d, //lpg_24
                                                         0x001f, //lpg_40
-                                                        0x001d, //lng_10
+                                                        0x000d, //lng_10
                                                         0x001f, //lng_20
-                                                        0x001d, //lng_24
+                                                        0x000d, //lng_24
                                                         0x001f  //lng_40
-                                                       };
-    const uint32_t sensor_err_mask[MAX_MODEL_COUNT] =    {0x0213, //ele10
-                                                          0x0213, //ele 20
-                                                          0x0213, //ele 24
-                                                          0x0213, //ele 40
-                                                          0x0213, //lpg 10
-                                                          0x0213, //lpg 20
-                                                          0x0213, //lpg 24
-                                                          0x0213, //lpg 40
-                                                          0x0213, //lng 10
-                                                          0x0213, //lng 20
-                                                          0x0213, //lng 24
-                                                          0x0213  //lng40
-                                                         };
-    const uint32_t state_err_mask[MAX_MODEL_COUNT] =       {0x0018, //ele 10
-                                                            0x0018, //ele 20
-                                                            0x0018, //ele 24
-                                                            0x0018, //ele 40
-                                                            0x0018, //lpg 10
-                                                            0x0018, //lpg 20
-                                                            0x0018, //lpg 24
-                                                            0x0018, //lpg 40
-                                                            0x0018, //lng 10
-                                                            0x0018, //lng 20
-                                                            0x0018, //lng 24
-                                                            0x0018  //lng  40
-                                                           };
+                                                       }, // end of noncooking state
+                                                        {0x000d, //ele_10
+                                                         0x001f, //ele_20
+                                                         0x000d, //ele_24
+                                                         0x001f, //ele_40
+                                                         0x000d, //lpg_10
+                                                         0x001f, //lpg_20
+                                                         0x000d, //lpg_24
+                                                         0x001f, //lpg_40
+                                                         0x000d, //lng_10
+                                                         0x001f, //lng_20
+                                                         0x000d, //lng_24
+                                                         0x001f  //lng_40
+                                                        }};
+//    const uint32_t sensor_err_mask[MAX_MODEL_COUNT] =    {0x0213, //ele10
+//                                                          0x0213, //ele 20
+//                                                          0x0213, //ele 24
+//                                                          0x0213, //ele 40
+//                                                          0x0213, //lpg 10
+//                                                          0x0213, //lpg 20
+//                                                          0x0213, //lpg 24
+//                                                          0x0213, //lpg 40
+//                                                          0x0213, //lng 10
+//                                                          0x0213, //lng 20
+//                                                          0x0213, //lng 24
+//                                                          0x0213  //lng40
+//                                                         };
+
+    const uint32_t sensor_err_mask[2][MAX_MODEL_COUNT] =    {
+                                                          {0x03fb, //ele10
+                                                          0x03fb, //ele 20
+                                                          0x03fb, //ele 24
+                                                          0x03fb, //ele 40
+                                                          0x03fb, //lpg 10
+                                                          0x03fb, //lpg 20
+                                                          0x03fb, //lpg 24
+                                                          0x03fb, //lpg 40
+                                                          0x03fb, //lng 10
+                                                          0x03fb, //lng 20
+                                                          0x03fb, //lng 24
+                                                          0x03fb  //lng40
+                                                         }, // end of noncooking state
+                                                        {0x03fb, //ele10
+                                                        0x03fb, //ele 20
+                                                        0x03fb, //ele 24
+                                                        0x03fb, //ele 40
+                                                        0x03fb, //lpg 10
+                                                        0x03fb, //lpg 20
+                                                        0x03fb, //lpg 24
+                                                        0x03fb, //lpg 40
+                                                        0x03fb, //lng 10
+                                                        0x03fb, //lng 20
+                                                        0x03fb, //lng 24
+                                                        0x03fb  //lng40
+                                                       }};
+    const uint32_t state_err_mask[2][MAX_MODEL_COUNT] =  {
+                                                            {0x000d, //ele 10
+                                                            0x001f, //ele 20
+                                                            0x000d, //ele 24
+                                                            0x001f, //ele 40
+                                                            0x000d, //lpg 10
+                                                            0x001f, //lpg 20
+                                                            0x000d, //lpg 24
+                                                            0x001f, //lpg 40
+                                                            0x000d, //lng 10
+                                                            0x001f, //lng 20
+                                                            0x000d, //lng 24
+                                                            0x001f  //lng  40
+                                                           }, //end of noncooking state
+                                                            {0x000d, //ele 10
+                                                            0x001f, //ele 20
+                                                            0x000d, //ele 24
+                                                            0x001f, //ele 40
+                                                            0x000d, //lpg 10
+                                                            0x001f, //lpg 20
+                                                            0x000d, //lpg 24
+                                                            0x001f, //lpg 40
+                                                            0x000d, //lng 10
+                                                            0x001f, //lng 20
+                                                            0x000d, //lng 24
+                                                            0x001f  //lng  40
+                                                           }};
 
 
     const error_exe_type sys_err_type_def[SYS_STATE_MAX][SYS_ERR_MAX]={ //30047
                                                         {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,
                                                         error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_OFF_COOK_OFF state
-                                                        {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,
-                                                        error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_OFF state
+                                                        {error_type_onlychk,error_type_onlychk,error_type_onlychk,error_type_engclrstopcmd,error_type_engclrstopcmd,
+                                                        error_type_engclrstopcmd,error_type_engclrstopcmd,error_type_engclrstopcmd,error_type_onlychk,error_type_onlychk}, // SYS_ON_COOK_OFF state
                                                         {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,
                                                         error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_ON state
                                                         {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,
@@ -293,10 +364,10 @@ private:
     const error_exe_type sensor_err_type_def[SYS_STATE_MAX][SENSOR_ERR_MAX]={ //30049
                                                         {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk,
                                                         error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_OFF_COOK_OFF state
-                                                        {error_type_engclrstopcmd,error_type_popclrstopcmd,error_type_allnone,error_type_popclrstopcmd,error_type_popclrstopcmd,
-                                                        error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_ON_COOK_OFF state
                                                         {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_allnone,error_type_popclrstopcmd,error_type_popclrstopcmd,
-                                                        error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_ON_COOK_ON state
+                                                        error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_OFF state
+                                                        {error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_allnone,error_type_popclrstopcmd,error_type_popclrstopcmd,
+                                                        error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd,error_type_popclrstopcmd}, // SYS_ON_COOK_ON state
                                                         {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk,
                                                         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
     };
diff --git a/app/gui/oven_control/servicepassinputdlg.cpp b/app/gui/oven_control/servicepassinputdlg.cpp
index 3f9dd77..82b8f13 100644
--- a/app/gui/oven_control/servicepassinputdlg.cpp
+++ b/app/gui/oven_control/servicepassinputdlg.cpp
@@ -3,9 +3,10 @@
 #include "engineermenuwindow.h"
 #include <QDebug>
 #include "soundplayer.h"
+#include "udphandler.h"
 
 
-ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode) :
+ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode,  bool sendClrCmd) :
     QDialog(parent),
     ui(new Ui::ServicePassInputDlg)
 {
@@ -29,6 +30,7 @@ ServicePassInputDlg::ServicePassInputDlg(QWidget *parent, service_pass_type mode
     connect(ui->keyboardwidget,SIGNAL(onKeyboardClickSignal(QString)),SLOT(keyboardInputEvent(QString)));
     ui->keyboardwidget->focusInKeyboard();
     m_nMode = mode;
+    m_bSendClrCmd = sendClrCmd;
 }
 
 ServicePassInputDlg::~ServicePassInputDlg()
@@ -41,6 +43,7 @@ void ServicePassInputDlg::on_ctrBtnOk_clicked()
 
     if( QString(m_strInputPass) == QString(NORMAL_PASS_WORD) && m_nMode == NORMAL_SERVICE_PASS_MODE){
         qDebug() << this->parentWidget() <<this->parent();
+        if(m_bSendClrCmd) UdpHandler::getInstance()->set(TG_ERROR_CLEAR,0xCECE);
         EngineerMenuWindow *w = new EngineerMenuWindow(this->parentWidget());
         connect(w,SIGNAL(destroyed(QObject*)),this,SLOT(close()));
         w->setWindowModality(Qt::WindowModal);
diff --git a/app/gui/oven_control/servicepassinputdlg.h b/app/gui/oven_control/servicepassinputdlg.h
index 1a81192..b4b94c8 100644
--- a/app/gui/oven_control/servicepassinputdlg.h
+++ b/app/gui/oven_control/servicepassinputdlg.h
@@ -27,7 +27,7 @@ class ServicePassInputDlg : public QDialog
     QChar m_strInputPass[MAX_PASSWORD+1];
 
 public:
-    explicit ServicePassInputDlg(QWidget *parent = 0, service_pass_type mode = NORMAL_SERVICE_PASS_MODE );
+    explicit ServicePassInputDlg(QWidget *parent = 0, service_pass_type mode = NORMAL_SERVICE_PASS_MODE,  bool sendClrCmd = false );
     ~ServicePassInputDlg();
 
 private slots:
@@ -49,6 +49,7 @@ private:
     Ui::ServicePassInputDlg *ui;
     int m_nCurInputCount;
     service_pass_type m_nMode;
+    bool m_bSendClrCmd;
 };
 
 #endif // SERVICEPASSINPUTDLG_H