Commit 7ae804762eced0168dfc951b4ff027514b3c7ff7
1 parent
239d51c8b9
Exists in
master
and in
2 other branches
에러 상황 추가
- 30057 에러 상황 추가
Showing
2 changed files
with
59 additions
and
1 deletions
Show diff stats
app/gui/oven_control/ovenstatics.cpp
| ... | ... | @@ -101,7 +101,7 @@ void OvenStatistics::onDataChanged() |
| 101 | 101 | |
| 102 | 102 | errstatetemp = state.controller_error; |
| 103 | 103 | if(errstatetemp != 0 && errstatetemp != curControlErrorState){ |
| 104 | - | |
| 104 | + processStateError(errstatetemp,ltime); | |
| 105 | 105 | } |
| 106 | 106 | curControlErrorState = errstatetemp; |
| 107 | 107 | |
| ... | ... | @@ -223,6 +223,47 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){ |
| 223 | 223 | } |
| 224 | 224 | } |
| 225 | 225 | |
| 226 | +void OvenStatistics::processStateError(uint16_t errflag, time_t ltime){ | |
| 227 | + error_item *item; | |
| 228 | + QString strMsg = "",strTitle=""; | |
| 229 | + uint8_t state; | |
| 230 | + if( control.system==0 && !oven->cooking()) state = SYS_OFF_COOK_OFF; | |
| 231 | + else if(control.system != 0 && !oven->cooking()) state = SYS_ON_COOK_OFF; | |
| 232 | + else if(control.system !=0 && oven->cooking()) state = SYS_ON_COOK_ON; | |
| 233 | + else state = SYS_ON_COOK_OFF; | |
| 234 | + | |
| 235 | + if(errflag & MAKE_MASK(STATE_ERR_BUNNER1)){ | |
| 236 | + item = &(srvdata->err_log.items.upper_pan_fail); | |
| 237 | + strMsg = tr("버너컨트롤러 1 이상 발생하였습니다."); | |
| 238 | + strTitle = tr("버너컨트롤러 1 이상 발생"); | |
| 239 | + processErrorItems(item,state_err_type_def[state][STATE_ERR_BUNNER1],strMsg,strTitle, ltime); | |
| 240 | + } | |
| 241 | + if(errflag & MAKE_MASK(STATE_ERR_BUNNER2)){ | |
| 242 | + item = &(srvdata->err_log.items.lower_pan_fail); | |
| 243 | + strMsg = tr("버너컨트롤러 2 이상 발생하였습니다."); | |
| 244 | + strTitle = tr("버너컨트롤러 2 이상 발생"); | |
| 245 | + processErrorItems(item,state_err_type_def[state][STATE_ERR_BUNNER2],strMsg,strTitle, ltime); | |
| 246 | + } | |
| 247 | + if(errflag & MAKE_MASK(STATE_ERR_BUNNER3)){ | |
| 248 | + item = &(srvdata->err_log.items.steam_pan_fail); | |
| 249 | + strMsg = tr("버너컨트롤러 3 이상 발생하였습니다."); | |
| 250 | + strTitle = tr("버너컨트로러 3 이상 발생"); | |
| 251 | + processErrorItems(item,state_err_type_def[state][STATE_ERR_BUNNER3],strMsg,strTitle, ltime); | |
| 252 | + } | |
| 253 | + if(errflag & MAKE_MASK(STATE_ERR_LOWERFAN)){ | |
| 254 | + item = &(srvdata->err_log.items.lower_motor_fail); | |
| 255 | + strMsg = tr("하부 FAN 컨트롤러 이상 발생하였습니다."); | |
| 256 | + strTitle = tr("하부 FAN 컨트롤러 이상 발생"); | |
| 257 | + processErrorItems(item,state_err_type_def[state][STATE_ERR_BUNNER2],strMsg,strTitle, ltime); | |
| 258 | + } | |
| 259 | + if(errflag & MAKE_MASK(STATE_ERR_UPPERFAN)){ | |
| 260 | + item = &(srvdata->err_log.items.upper_motor_fail); | |
| 261 | + strMsg = tr("상부 FAN 컨트롤러 이상 발생하였습니다."); | |
| 262 | + strTitle = tr("상부 FAN 컨트롤러 이상 발생"); | |
| 263 | + processErrorItems(item,state_err_type_def[state][STATE_ERR_BUNNER2],strMsg,strTitle, ltime); | |
| 264 | + } | |
| 265 | +} | |
| 266 | + | |
| 226 | 267 | void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ |
| 227 | 268 | error_item *item; |
| 228 | 269 | QString strMsg = "",strTitle = ""; | ... | ... |
app/gui/oven_control/ovenstatics.h
| ... | ... | @@ -21,6 +21,7 @@ |
| 21 | 21 | |
| 22 | 22 | |
| 23 | 23 | #define COMM_ERR_MAX 5 |
| 24 | +#define STATE_ERR_MAX 5 | |
| 24 | 25 | |
| 25 | 26 | |
| 26 | 27 | #define COMM_ERR_MASK_ERR_CLEAR_COOKING 0x0000 |
| ... | ... | @@ -108,6 +109,14 @@ enum comm_err_id{ |
| 108 | 109 | COMM_ERR_LOWERFAN |
| 109 | 110 | }; |
| 110 | 111 | |
| 112 | +enum state_err_id{ | |
| 113 | + STATE_ERR_BUNNER1 =0, | |
| 114 | + STATE_ERR_BUNNER2 , | |
| 115 | + STATE_ERR_BUNNER3 , | |
| 116 | + STATE_ERR_UPPERFAN , | |
| 117 | + STATE_ERR_LOWERFAN | |
| 118 | +}; | |
| 119 | + | |
| 111 | 120 | enum sensor_err_id{ |
| 112 | 121 | SENSOR_ERR_SENSOR_1 =0, |
| 113 | 122 | SENSOR_ERR_SENSOR_2 , |
| ... | ... | @@ -207,6 +216,13 @@ private: |
| 207 | 216 | {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_engnonclr,error_type_engnonclr}, //SYS_OFF_COO_ON |
| 208 | 217 | }; |
| 209 | 218 | |
| 219 | + const error_exe_type state_err_type_def[SYS_STATE_MAX][STATE_ERR_MAX] ={\ | |
| 220 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr}, //SYS_OFF_COO_OFF | |
| 221 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr}, //SYS_ON_COO_OFF | |
| 222 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr}, //SYS_ON_COO_ON | |
| 223 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr}, //SYS_OFF_COO_ON | |
| 224 | + }; | |
| 225 | + | |
| 210 | 226 | const error_exe_type sensor_err_type_def[SYS_STATE_MAX][SENSOR_ERR_MAX]={ |
| 211 | 227 | {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk, |
| 212 | 228 | error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_OFF_COOK_OFF state |
| ... | ... | @@ -253,6 +269,7 @@ private: |
| 253 | 269 | void processSystemError(uint16_t errflag,time_t ltime); |
| 254 | 270 | void processCommError(uint16_t errflag,time_t ltime); |
| 255 | 271 | void processSensorError(uint16_t errflag, time_t ltime); |
| 272 | + void processStateError(uint16_t errflat, time_t ltime); | |
| 256 | 273 | void processErrorItems(error_item *item, error_exe_type errtype, const QString &MsgDesc,const QString &MsgTitle, time_t ltime); |
| 257 | 274 | |
| 258 | 275 | ... | ... |