Commit 20fcaaf6812898777f629b28b3ed0794c1d39551

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

에러 마스크 별도 적용

app/gui/oven_control/main.cpp
... ... @@ -19,11 +19,13 @@ int main(int argc, char *argv[])
19 19 UdpHandler *udp = UdpHandler::getInstance();
20 20 interface->setUdpHandler(udp);
21 21  
  22 + oven->setDefault(Define::CombiMode);
  23 +
22 24 Config::getInstance(oven);
23 25  
24 26 OvenStatistics::getInstance(oven);
25 27  
26   - oven->setDefault(Define::CombiMode);
  28 +
27 29  
28 30 // QTranslator* trans = new QTranslator();
29 31 // qDebug() << trans->load(":/lang_en.qm");
... ...
app/gui/oven_control/ovenstatics.cpp
... ... @@ -16,6 +16,7 @@ OvenStatistics* OvenStatistics::getInstance(QObject *parent){
16 16 p_singletonInstance = new OvenStatistics(parent);
17 17 p_singletonInstance->udp = UdpHandler::getInstance();
18 18 p_singletonInstance->oven = Oven::getInstance();
  19 + p_singletonInstance->cfg = Config::getInstance();
19 20 //for singletone event debug
20 21 // MainWindow* mw = (MainWindow*)parent;
21 22 // connect(mw->pcombiButton, SIGNAL(clicked()),p_singtonInstance, SLOT(onDataChanged()));
... ... @@ -85,25 +86,25 @@ void OvenStatistics::onDataChanged()
85 86  
86 87  
87 88 if(state.system_error!=0 && state.system_error != curSysErrorState){
88   - processSystemError( state.system_error & SYS_ERROR_MASK,ltime);
  89 + processSystemError( (state.system_error & sys_err_mask[cfg->getConfigValue(Define::config_model).d32]) ,ltime);
89 90 }
90 91 curSysErrorState = state.system_error;
91 92  
92 93 errstatetemp = state.communication_error;
93 94 if(errstatetemp!=0 && errstatetemp != curCommErrorState ){
94   - processCommError( errstatetemp&COMM_ERROR_MASK,ltime );
  95 + processCommError( (errstatetemp & comm_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime );
95 96 }
96 97 curCommErrorState = errstatetemp;
97 98  
98 99 errstatetemp = state.sensor_error;
99 100 if(errstatetemp!=0 && errstatetemp != curSensorErrorState ){
100   - processSensorError(errstatetemp&SENSOR_ERROR_MASK,ltime );
  101 + processSensorError( (errstatetemp& sensor_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime );
101 102 }
102 103 curSensorErrorState = errstatetemp;
103 104  
104 105 errstatetemp = state.controller_error;
105 106 if(errstatetemp != 0 && errstatetemp != curControlErrorState){
106   - processStateError(errstatetemp&STATE_ERROR_MASK,ltime);
  107 + processStateError((errstatetemp&state_err_mask[cfg->getConfigValue(Define::config_model).d32]),ltime);
107 108 }
108 109 curControlErrorState = errstatetemp;
109 110  
... ...
app/gui/oven_control/ovenstatics.h
... ... @@ -8,7 +8,10 @@
8 8 #include "udphandler.h"
9 9 #include "oven.h"
10 10 #include "servicedata.h"
  11 +#include "config.h"
11 12  
  13 +
  14 +#define MAX_MODEL_COUNT 12
12 15 #define SYS_STATE_MAX 4
13 16  
14 17  
... ... @@ -208,6 +211,12 @@ public:
208 211  
209 212 private:
210 213  
  214 + const uint32_t sys_err_mask[MAX_MODEL_COUNT] = {0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff,0x03ff};
  215 + const uint32_t comm_err_mask[MAX_MODEL_COUNT] = {0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f,0x001f};
  216 + const uint32_t sensor_err_mask[MAX_MODEL_COUNT] = {0x0213,0x0213,0x0213,0x0213,0x0213,0x0213,0x0213,0x0213,0x0213,0x0213,0x0213,0x0213};
  217 + const uint32_t state_err_mask[MAX_MODEL_COUNT] = {0x0018,0x0018,0x0018,0x0018,0x0018,0x0018,0x0018,0x0018,0x0018,0x0018,0x0018,0x0018};
  218 +
  219 +
211 220 const error_exe_type sys_err_type_def[SYS_STATE_MAX][SYS_ERR_MAX]={ //30047
212 221 {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,
213 222 error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_OFF_COOK_OFF state
... ... @@ -255,6 +264,7 @@ private:
255 264 static OvenStatistics* p_singletonInstance;
256 265 UdpHandler *udp;
257 266 Oven* oven;
  267 + Config* cfg;
258 268 oven_control_t control;
259 269 oven_state_t state;
260 270 error_item* m_pLastErrItem;
... ...