Commit 27e821e2e86e139751698415386399cb77738a53

Authored by 고영탁
1 parent ae83765cfd
Exists in master

version 1.6.8 Release

app/gui/oven_control/define.h
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 5
6 #define MAJOR_VER 1 6 #define MAJOR_VER 1
7 #define MINOR_VER 6 7 #define MINOR_VER 6
8 -#define HOTFIX_VER 7 8 +#define HOTFIX_VER 8
9 9
10 // 0 for normal 10 // 0 for normal
11 // 1 for premium 11 // 1 for premium
app/gui/oven_control/ovenstatics.cpp
@@ -51,6 +51,7 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent) @@ -51,6 +51,7 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent)
51 m_nLastPopupidx = MAX_ERROR_TYPE_CNT; 51 m_nLastPopupidx = MAX_ERROR_TYPE_CNT;
52 m_wndSrvpassdlg = NULL; 52 m_wndSrvpassdlg = NULL;
53 state.firmware_version = 150; 53 state.firmware_version = 150;
  54 + m_bPrevteamTempErr = false;
54 55
55 for(i=0;i<MAX_LOG_SENSOR;i++){ 56 for(i=0;i<MAX_LOG_SENSOR;i++){
56 curSensorValue[i].utemp = 0; 57 curSensorValue[i].utemp = 0;
@@ -59,7 +60,10 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent) @@ -59,7 +60,10 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent)
59 curSensorValue[12].itemp = 100; 60 curSensorValue[12].itemp = 100;
60 61
61 srvdata = new ServiceData(); 62 srvdata = new ServiceData();
62 - 63 + m_tmrSvoff = new QTimer(this);
  64 + m_tmrSvoff->setInterval(30000);
  65 + m_tmrSvoff->setSingleShot(true);
  66 + connect(m_tmrSvoff, SIGNAL(timeout()), this, SLOT(onSvOffTimeoutFired()));
63 } 67 }
64 68
65 OvenStatistics::~OvenStatistics(){ 69 OvenStatistics::~OvenStatistics(){
@@ -73,6 +77,7 @@ void OvenStatistics::onDataChanged() @@ -73,6 +77,7 @@ void OvenStatistics::onDataChanged()
73 time_t ltime=0; 77 time_t ltime=0;
74 uint16_t errstatetemp; 78 uint16_t errstatetemp;
75 uint8_t cookingstate=0; 79 uint8_t cookingstate=0;
  80 + bool curSteamTempErr = false;
76 udp->fillControl(control); 81 udp->fillControl(control);
77 udp->fillData(state); 82 udp->fillData(state);
78 bDataRefreshed = true; 83 bDataRefreshed = true;
@@ -86,6 +91,15 @@ void OvenStatistics::onDataChanged() @@ -86,6 +91,15 @@ void OvenStatistics::onDataChanged()
86 qDebug() << " Upper RPM : " << m_nUpperRpm << ", Lower Rpm : " << m_nLowerRpm << ", Steam Rpm : " << m_nSteamRpm; 91 qDebug() << " Upper RPM : " << m_nUpperRpm << ", Lower Rpm : " << m_nLowerRpm << ", Steam Rpm : " << m_nSteamRpm;
87 } 92 }
88 93
  94 + curSteamTempErr = (state.system_error & MAKE_MASK(SYS_ERR_STAM_TEMP_ALARM)) != 0;
  95 + if(curSteamTempErr != m_bPrevteamTempErr){
  96 + m_bPrevteamTempErr = curSteamTempErr;
  97 + if(m_bPrevteamTempErr){
  98 + udp->set_steam_high_sv_onoff(true);
  99 + if(!m_tmrSvoff->isActive()) m_tmrSvoff->start();
  100 + }
  101 + }
  102 +
89 if((control.cooking || oven->cooking() || oven->preheating() || oven->cooldown())) cookingstate = 1; 103 if((control.cooking || oven->cooking() || oven->preheating() || oven->cooldown())) cookingstate = 1;
90 else if(state.cleaning_sate != 0 ) cookingstate = 2; 104 else if(state.cleaning_sate != 0 ) cookingstate = 2;
91 105
@@ -136,7 +150,7 @@ void OvenStatistics::processSensorError(uint16_t errflag, time_t ltime){ @@ -136,7 +150,7 @@ void OvenStatistics::processSensorError(uint16_t errflag, time_t ltime){
136 if( control.system==0 && !bCookingState ) state = SYS_OFF_COOK_OFF; 150 if( control.system==0 && !bCookingState ) state = SYS_OFF_COOK_OFF;
137 else if(control.system !=0 && this->state.cleaning_sate !=0 ) state = SYS_ON_WASH; 151 else if(control.system !=0 && this->state.cleaning_sate !=0 ) state = SYS_ON_WASH;
138 else if(control.system != 0 && !bCookingState) state = SYS_ON_COOK_OFF; 152 else if(control.system != 0 && !bCookingState) state = SYS_ON_COOK_OFF;
139 - else if(control.system !=0 && bCookingState) state = SYS_ON_COOK_ON; 153 + else if(control.system !=0 && bCookingState) state = SYS_ON_COOK_ON;
140 else state = SYS_ON_COOK_OFF; 154 else state = SYS_ON_COOK_OFF;
141 155
142 if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_1)){ 156 if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_1)){
@@ -213,7 +227,7 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){ @@ -213,7 +227,7 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){
213 if( control.system==0 && !bCookingState ) state = SYS_OFF_COOK_OFF; 227 if( control.system==0 && !bCookingState ) state = SYS_OFF_COOK_OFF;
214 else if(control.system !=0 && this->state.cleaning_sate !=0 ) state = SYS_ON_WASH; 228 else if(control.system !=0 && this->state.cleaning_sate !=0 ) state = SYS_ON_WASH;
215 else if(control.system != 0 && !bCookingState) state = SYS_ON_COOK_OFF; 229 else if(control.system != 0 && !bCookingState) state = SYS_ON_COOK_OFF;
216 - else if(control.system !=0 && bCookingState) state = SYS_ON_COOK_ON; 230 + else if(control.system !=0 && bCookingState) state = SYS_ON_COOK_ON;
217 else state = SYS_ON_COOK_OFF; 231 else state = SYS_ON_COOK_OFF;
218 232
219 if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){ 233 if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){
@@ -299,7 +313,7 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ @@ -299,7 +313,7 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){
299 if( control.system==0 && !bCookingState ) state = SYS_OFF_COOK_OFF; 313 if( control.system==0 && !bCookingState ) state = SYS_OFF_COOK_OFF;
300 else if(control.system !=0 && this->state.cleaning_sate !=0 ) state = SYS_ON_WASH; 314 else if(control.system !=0 && this->state.cleaning_sate !=0 ) state = SYS_ON_WASH;
301 else if(control.system != 0 && !bCookingState) state = SYS_ON_COOK_OFF; 315 else if(control.system != 0 && !bCookingState) state = SYS_ON_COOK_OFF;
302 - else if(control.system !=0 && bCookingState) state = SYS_ON_COOK_ON; 316 + else if(control.system !=0 && bCookingState) state = SYS_ON_COOK_ON;
303 else state = SYS_ON_COOK_OFF; 317 else state = SYS_ON_COOK_OFF;
304 318
305 if( errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER1)){ 319 if( errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER1)){
@@ -771,3 +785,8 @@ void OvenStatistics::onCommTimeoutFired() @@ -771,3 +785,8 @@ void OvenStatistics::onCommTimeoutFired()
771 dlg->showFullScreen(); 785 dlg->showFullScreen();
772 } 786 }
773 } 787 }
  788 +
  789 +void OvenStatistics::onSvOffTimeoutFired()
  790 +{
  791 + udp->set_steam_high_sv_onoff(false);
  792 +}
app/gui/oven_control/ovenstatics.h
@@ -499,6 +499,8 @@ private: @@ -499,6 +499,8 @@ private:
499 uint32_t m_nUpperRpm; 499 uint32_t m_nUpperRpm;
500 uint32_t m_nLowerRpm; 500 uint32_t m_nLowerRpm;
501 uint32_t m_nSteamRpm; 501 uint32_t m_nSteamRpm;
  502 + bool m_bPrevteamTempErr;
  503 + QTimer *m_tmrSvoff;
502 504
503 explicit OvenStatistics(QObject* parent); 505 explicit OvenStatistics(QObject* parent);
504 ~OvenStatistics(); 506 ~OvenStatistics();
@@ -525,6 +527,7 @@ public slots: @@ -525,6 +527,7 @@ public slots:
525 void onErrorPopupClosed(int erridx); 527 void onErrorPopupClosed(int erridx);
526 void setWndPassInputNull(void){m_wndSrvpassdlg = NULL;} 528 void setWndPassInputNull(void){m_wndSrvpassdlg = NULL;}
527 void onCommTimeoutFired(); 529 void onCommTimeoutFired();
  530 + void onSvOffTimeoutFired();
528 531
529 signals: 532 signals:
530 void onErrorFired(int erridx); 533 void onErrorFired(int erridx);
app/gui/oven_control/udphandler.cpp
@@ -21,6 +21,7 @@ UdpHandler::UdpHandler(QObject *parent) : QObject(parent) @@ -21,6 +21,7 @@ UdpHandler::UdpHandler(QObject *parent) : QObject(parent)
21 bzero(&control, sizeof(control)); 21 bzero(&control, sizeof(control));
22 bzero(&state, sizeof(state)); 22 bzero(&state, sizeof(state));
23 23
  24 + m_steamhighctr_enabled = false;
24 emitted = false; 25 emitted = false;
25 emitTimeoutTimer.setSingleShot(true); 26 emitTimeoutTimer.setSingleShot(true);
26 emitTimeoutTimer.setInterval(COMM_TIMEOUT_SEC * 1000); 27 emitTimeoutTimer.setInterval(COMM_TIMEOUT_SEC * 1000);
@@ -40,6 +41,24 @@ bool UdpHandler::init() @@ -40,6 +41,24 @@ bool UdpHandler::init()
40 return true; 41 return true;
41 } 42 }
42 43
  44 +void UdpHandler::set_steam_high_sv_onoff(bool onoff)
  45 +{
  46 + if(onoff){
  47 + if(!m_steamhighctr_enabled){
  48 + sendCommand(CMD_ONOFF, TG_MANUAL_RELAY, SWITCH_ON);
  49 + sendCommand(CMD_ONOFF, TG_SSV, SWITCH_ON);
  50 + m_steamhighctr_enabled = true;
  51 + }
  52 + }
  53 + else{
  54 + if(m_steamhighctr_enabled){
  55 + sendCommand(CMD_ONOFF, TG_SSV, SWITCH_OFF);
  56 + sendCommand(CMD_ONOFF, TG_MANUAL_RELAY, SWITCH_OFF);
  57 + m_steamhighctr_enabled = false;
  58 + }
  59 + }
  60 +}
  61 +
43 void UdpHandler::readPendingDatagrams() 62 void UdpHandler::readPendingDatagrams()
44 { 63 {
45 while (sock->hasPendingDatagrams()) { 64 while (sock->hasPendingDatagrams()) {
@@ -103,16 +122,28 @@ void UdpHandler::processState(oven_state_t *state) @@ -103,16 +122,28 @@ void UdpHandler::processState(oven_state_t *state)
103 122
104 void UdpHandler::turnOn(int target) 123 void UdpHandler::turnOn(int target)
105 { 124 {
  125 + if(m_steamhighctr_enabled){
  126 + sendCommand(CMD_ONOFF, TG_MANUAL_RELAY, SWITCH_OFF);
  127 + m_steamhighctr_enabled = false;
  128 + }
106 sendCommand(CMD_ONOFF, target, SWITCH_ON); 129 sendCommand(CMD_ONOFF, target, SWITCH_ON);
107 } 130 }
108 131
109 void UdpHandler::turnOff(int target) 132 void UdpHandler::turnOff(int target)
110 { 133 {
  134 + if(m_steamhighctr_enabled){
  135 + sendCommand(CMD_ONOFF, TG_MANUAL_RELAY, SWITCH_OFF);
  136 + m_steamhighctr_enabled = false;
  137 + }
111 sendCommand(CMD_ONOFF, target, SWITCH_OFF); 138 sendCommand(CMD_ONOFF, target, SWITCH_OFF);
112 } 139 }
113 140
114 void UdpHandler::set(int target, int value) 141 void UdpHandler::set(int target, int value)
115 { 142 {
  143 + if(m_steamhighctr_enabled){
  144 + sendCommand(CMD_ONOFF, TG_MANUAL_RELAY, SWITCH_OFF);
  145 + m_steamhighctr_enabled = false;
  146 + }
116 sendCommand(CMD_VALUE, target, value); 147 sendCommand(CMD_VALUE, target, value);
117 } 148 }
118 149
app/gui/oven_control/udphandler.h
@@ -30,6 +30,7 @@ public: @@ -30,6 +30,7 @@ public:
30 } 30 }
31 31
32 bool init(); 32 bool init();
  33 + void set_steam_high_sv_onoff(bool onoff);
33 34
34 const oven_control_t &getControl() { return control; } 35 const oven_control_t &getControl() { return control; }
35 const oven_state_t &getData() { return state; } 36 const oven_state_t &getData() { return state; }
@@ -101,6 +102,7 @@ private: @@ -101,6 +102,7 @@ private:
101 QUdpSocket *sock; 102 QUdpSocket *sock;
102 QTimer emitTimeoutTimer; 103 QTimer emitTimeoutTimer;
103 bool emitted; 104 bool emitted;
  105 + bool m_steamhighctr_enabled;
104 106
105 private slots: 107 private slots:
106 void readPendingDatagrams(); 108 void readPendingDatagrams();