Commit 14a73498f68a8bba8059fb18a8cb6a6a47dee76e
1 parent
2097d305cc
Exists in
master
and in
2 other branches
소스 코드 정리
- 명명법 통일 - 오타 수정
Showing
41 changed files
with
631 additions
and
631 deletions
Show diff stats
app/gui/oven_control/engineermenuwindow.cpp
... | ... | @@ -6,9 +6,9 @@ |
6 | 6 | #include "functiontestwindow.h" |
7 | 7 | #include "ovenstatics.h" |
8 | 8 | |
9 | -engineermenuwindow::engineermenuwindow(QWidget *parent) : | |
9 | +EngineerMenuWindow::EngineerMenuWindow(QWidget *parent) : | |
10 | 10 | QMainWindow(parent), |
11 | - ui(new Ui::engineermenuwindow) | |
11 | + ui(new Ui::EngineerMenuWindow) | |
12 | 12 | { |
13 | 13 | ui->setupUi(this); |
14 | 14 | |
... | ... | @@ -19,33 +19,33 @@ engineermenuwindow::engineermenuwindow(QWidget *parent) : |
19 | 19 | |
20 | 20 | } |
21 | 21 | |
22 | -engineermenuwindow::~engineermenuwindow() | |
22 | +EngineerMenuWindow::~EngineerMenuWindow() | |
23 | 23 | { |
24 | 24 | delete ui; |
25 | 25 | } |
26 | 26 | |
27 | -void engineermenuwindow::on_servicehistorybutton_clicked() | |
27 | +void EngineerMenuWindow::on_serviceHistoryButton_clicked() | |
28 | 28 | { |
29 | - serviceHistoryMain *w = new serviceHistoryMain(this); | |
29 | + ServiceHistoryMain *w = new ServiceHistoryMain(this); | |
30 | 30 | w->setWindowModality(Qt::WindowModal); |
31 | 31 | w->showFullScreen(); |
32 | 32 | } |
33 | 33 | |
34 | -void engineermenuwindow::on_operationtimebutton_clicked() | |
34 | +void EngineerMenuWindow::on_operationTimeButton_clicked() | |
35 | 35 | { |
36 | - operationTimeMain *w = new operationTimeMain(this); | |
36 | + OperationTimeMain *w = new OperationTimeMain(this); | |
37 | 37 | w->setWindowModality(Qt::WindowModal); |
38 | 38 | w->showFullScreen(); |
39 | 39 | } |
40 | 40 | |
41 | -void engineermenuwindow::on_realdatabutton_clicked() | |
41 | +void EngineerMenuWindow::on_realDataButton_clicked() | |
42 | 42 | { |
43 | - realtimeMain* w = new realtimeMain(this); | |
43 | + RealtimeMain* w = new RealtimeMain(this); | |
44 | 44 | w->setWindowModality(Qt::WindowModal); |
45 | 45 | w->showFullScreen(); |
46 | 46 | } |
47 | 47 | |
48 | -void engineermenuwindow::on_functiontestbutton_clicked() | |
48 | +void EngineerMenuWindow::on_functionTestButton_clicked() | |
49 | 49 | { |
50 | 50 | FunctionTestWindow *w = new FunctionTestWindow(this); |
51 | 51 | w->setWindowModality(Qt::WindowModal); | ... | ... |
app/gui/oven_control/engineermenuwindow.h
... | ... | @@ -4,28 +4,28 @@ |
4 | 4 | #include <QMainWindow> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class engineermenuwindow; | |
7 | +class EngineerMenuWindow; | |
8 | 8 | } |
9 | 9 | |
10 | -class engineermenuwindow : public QMainWindow | |
10 | +class EngineerMenuWindow : public QMainWindow | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit engineermenuwindow(QWidget *parent = 0); | |
16 | - ~engineermenuwindow(); | |
15 | + explicit EngineerMenuWindow(QWidget *parent = 0); | |
16 | + ~EngineerMenuWindow(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | - void on_servicehistorybutton_clicked(); | |
19 | + void on_serviceHistoryButton_clicked(); | |
20 | 20 | |
21 | - void on_operationtimebutton_clicked(); | |
21 | + void on_operationTimeButton_clicked(); | |
22 | 22 | |
23 | - void on_realdatabutton_clicked(); | |
23 | + void on_realDataButton_clicked(); | |
24 | 24 | |
25 | - void on_functiontestbutton_clicked(); | |
25 | + void on_functionTestButton_clicked(); | |
26 | 26 | |
27 | 27 | private: |
28 | - Ui::engineermenuwindow *ui; | |
28 | + Ui::EngineerMenuWindow *ui; | |
29 | 29 | }; |
30 | 30 | |
31 | 31 | #endif // ENGINEERMENUWINDOW_H | ... | ... |
app/gui/oven_control/engineermenuwindow.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>engineermenuwindow</class> | |
4 | - <widget class="QMainWindow" name="engineermenuwindow"> | |
3 | + <class>EngineerMenuWindow</class> | |
4 | + <widget class="QMainWindow" name="EngineerMenuWindow"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> |
... | ... | @@ -116,7 +116,7 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</str |
116 | 116 | <number>0</number> |
117 | 117 | </property> |
118 | 118 | <item row="0" column="0" colspan="2"> |
119 | - <widget class="QPushButton" name="engadjustbutton"> | |
119 | + <widget class="QPushButton" name="engAdjustButton"> | |
120 | 120 | <property name="sizePolicy"> |
121 | 121 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
122 | 122 | <horstretch>0</horstretch> |
... | ... | @@ -186,7 +186,7 @@ QPushButton { text-align: left;} |
186 | 186 | <number>0</number> |
187 | 187 | </property> |
188 | 188 | <item row="0" column="0" colspan="2"> |
189 | - <widget class="QPushButton" name="stdconfigbutton"> | |
189 | + <widget class="QPushButton" name="stdConfigButton"> | |
190 | 190 | <property name="sizePolicy"> |
191 | 191 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
192 | 192 | <horstretch>0</horstretch> |
... | ... | @@ -255,7 +255,7 @@ QPushButton { text-align: left;}</string> |
255 | 255 | <number>0</number> |
256 | 256 | </property> |
257 | 257 | <item row="0" column="0" colspan="2"> |
258 | - <widget class="QPushButton" name="functiontestbutton"> | |
258 | + <widget class="QPushButton" name="functionTestButton"> | |
259 | 259 | <property name="sizePolicy"> |
260 | 260 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
261 | 261 | <horstretch>0</horstretch> |
... | ... | @@ -324,7 +324,7 @@ QPushButton { color: rgb(255, 255, 255);text-align: left;}</string> |
324 | 324 | <number>0</number> |
325 | 325 | </property> |
326 | 326 | <item row="0" column="0" colspan="2"> |
327 | - <widget class="QPushButton" name="servicehistorybutton"> | |
327 | + <widget class="QPushButton" name="serviceHistoryButton"> | |
328 | 328 | <property name="sizePolicy"> |
329 | 329 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
330 | 330 | <horstretch>0</horstretch> |
... | ... | @@ -393,7 +393,7 @@ QPushButton {color: rgb(255, 255, 255); text-align: left;}</string> |
393 | 393 | <number>0</number> |
394 | 394 | </property> |
395 | 395 | <item row="0" column="0" colspan="2"> |
396 | - <widget class="QPushButton" name="realdatabutton"> | |
396 | + <widget class="QPushButton" name="realDataButton"> | |
397 | 397 | <property name="sizePolicy"> |
398 | 398 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
399 | 399 | <horstretch>0</horstretch> |
... | ... | @@ -461,7 +461,7 @@ QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }QPushBu |
461 | 461 | <number>0</number> |
462 | 462 | </property> |
463 | 463 | <item row="0" column="0" colspan="2"> |
464 | - <widget class="QPushButton" name="operationtimebutton"> | |
464 | + <widget class="QPushButton" name="operationTimeButton"> | |
465 | 465 | <property name="sizePolicy"> |
466 | 466 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
467 | 467 | <horstretch>0</horstretch> |
... | ... | @@ -529,7 +529,7 @@ QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }QPushBu |
529 | 529 | <number>0</number> |
530 | 530 | </property> |
531 | 531 | <item row="0" column="0" colspan="2"> |
532 | - <widget class="QPushButton" name="modeltypeconfigbutton"> | |
532 | + <widget class="QPushButton" name="modelTypeConfigButton"> | |
533 | 533 | <property name="sizePolicy"> |
534 | 534 | <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> |
535 | 535 | <horstretch>0</horstretch> | ... | ... |
app/gui/oven_control/errorpopupdlg.cpp
1 | 1 | #include "errorpopupdlg.h" |
2 | 2 | #include "ui_errorpopupdlg.h" |
3 | 3 | |
4 | -errorPopupDlg::errorPopupDlg(QWidget *parent, const QString &MsgDesc, const QString &MsgTitle) : | |
4 | +ErrorPopupDlg::ErrorPopupDlg(QWidget *parent, const QString &MsgDesc, const QString &MsgTitle) : | |
5 | 5 | QDialog(parent), |
6 | - ui(new Ui::errorPopupDlg) | |
6 | + ui(new Ui::ErrorPopupDlg) | |
7 | 7 | { |
8 | 8 | ui->setupUi(this); |
9 | 9 | this->setAttribute( Qt::WA_TranslucentBackground); |
... | ... | @@ -15,12 +15,12 @@ errorPopupDlg::errorPopupDlg(QWidget *parent, const QString &MsgDesc, const QStr |
15 | 15 | ui->ctrlWarnTitle->setText(MsgTitle); |
16 | 16 | } |
17 | 17 | |
18 | -errorPopupDlg::~errorPopupDlg() | |
18 | +ErrorPopupDlg::~ErrorPopupDlg() | |
19 | 19 | { |
20 | 20 | delete ui; |
21 | 21 | } |
22 | 22 | |
23 | -void errorPopupDlg::on_ctrlOkBtn_clicked() | |
23 | +void ErrorPopupDlg::on_ctrlOkBtn_clicked() | |
24 | 24 | { |
25 | 25 | close(); |
26 | 26 | } | ... | ... |
app/gui/oven_control/errorpopupdlg.h
... | ... | @@ -4,22 +4,22 @@ |
4 | 4 | #include <QDialog> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class errorPopupDlg; | |
7 | +class ErrorPopupDlg; | |
8 | 8 | } |
9 | 9 | |
10 | -class errorPopupDlg : public QDialog | |
10 | +class ErrorPopupDlg : public QDialog | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit errorPopupDlg(QWidget *parent = 0, const QString &MsgDesc=0, const QString &MsgTitle=0); | |
16 | - ~errorPopupDlg(); | |
15 | + explicit ErrorPopupDlg(QWidget *parent = 0, const QString &MsgDesc=0, const QString &MsgTitle=0); | |
16 | + ~ErrorPopupDlg(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | 19 | void on_ctrlOkBtn_clicked(); |
20 | 20 | |
21 | 21 | private: |
22 | - Ui::errorPopupDlg *ui; | |
22 | + Ui::ErrorPopupDlg *ui; | |
23 | 23 | }; |
24 | 24 | |
25 | 25 | #endif // ERRORPOPUPDLG_H | ... | ... |
app/gui/oven_control/errorpopupdlg.ui
app/gui/oven_control/historylistwindow.cpp
... | ... | @@ -8,9 +8,9 @@ |
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | -historyListWindow::historyListWindow(QWidget *parent) : | |
11 | +HistoryListWindow::HistoryListWindow(QWidget *parent) : | |
12 | 12 | QMainWindow(parent), |
13 | - ui(new Ui::historyListWindow) | |
13 | + ui(new Ui::HistoryListWindow) | |
14 | 14 | { |
15 | 15 | ui->setupUi(this); |
16 | 16 | |
... | ... | @@ -64,17 +64,17 @@ historyListWindow::historyListWindow(QWidget *parent) : |
64 | 64 | m_nWindowType = ERROR_HISTORY_UPPERBUNNER; |
65 | 65 | } |
66 | 66 | |
67 | -historyListWindow::~historyListWindow() | |
67 | +HistoryListWindow::~HistoryListWindow() | |
68 | 68 | { |
69 | 69 | delete ui; |
70 | 70 | } |
71 | 71 | |
72 | -void historyListWindow::on_ctrlBtnBack_clicked() | |
72 | +void HistoryListWindow::on_ctrlBtnBack_clicked() | |
73 | 73 | { |
74 | 74 | deleteLater(); |
75 | 75 | } |
76 | 76 | |
77 | -void historyListWindow::reloadDataset(void){ | |
77 | +void HistoryListWindow::reloadDataset(void){ | |
78 | 78 | int i = 0; |
79 | 79 | QString strPrefix = tr("에러"); |
80 | 80 | QString strTemp = ""; |
... | ... | @@ -115,7 +115,7 @@ void historyListWindow::reloadDataset(void){ |
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
118 | -void historyListWindow::setUpperBunnerDataSet(void){ | |
118 | +void HistoryListWindow::setUpperBunnerDataSet(void){ | |
119 | 119 | OvenStatistics *ovenst = OvenStatistics::getInstance(); |
120 | 120 | m_nCurDpStartPos = 0; |
121 | 121 | m_nCurSelPos = 0; |
... | ... | @@ -125,13 +125,13 @@ void historyListWindow::setUpperBunnerDataSet(void){ |
125 | 125 | strName.append(tr(m_strWindowName[ERROR_HISTORY_UPPERBUNNER ])); |
126 | 126 | m_ctrlErrorNameLabel->setText(strName); |
127 | 127 | for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_UPPERBUNNER];i++){ |
128 | - err_items[i] = &(ovenst->srvdatas->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_UPPERBUNNER][i]]); | |
128 | + err_items[i] = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_UPPERBUNNER][i]]); | |
129 | 129 | } |
130 | 130 | reloadDataset(); |
131 | 131 | } |
132 | 132 | } |
133 | 133 | |
134 | -void historyListWindow::setSteamBunnerDataSet(void){ | |
134 | +void HistoryListWindow::setSteamBunnerDataSet(void){ | |
135 | 135 | OvenStatistics *ovenst = OvenStatistics::getInstance(); |
136 | 136 | m_nCurDpStartPos = 0; |
137 | 137 | m_nCurSelPos = 0; |
... | ... | @@ -141,13 +141,13 @@ void historyListWindow::setSteamBunnerDataSet(void){ |
141 | 141 | strName.append(tr(m_strWindowName[ERROR_HISTORY_STEAMBUNNER ])); |
142 | 142 | m_ctrlErrorNameLabel->setText(strName); |
143 | 143 | for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_STEAMBUNNER];i++){ |
144 | - err_items[i] = &(ovenst->srvdatas->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_STEAMBUNNER][i]]); | |
144 | + err_items[i] = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_STEAMBUNNER][i]]); | |
145 | 145 | } |
146 | 146 | reloadDataset(); |
147 | 147 | } |
148 | 148 | } |
149 | 149 | |
150 | -void historyListWindow::setLowerBunnerDataSet(void){ | |
150 | +void HistoryListWindow::setLowerBunnerDataSet(void){ | |
151 | 151 | OvenStatistics *ovenst = OvenStatistics::getInstance(); |
152 | 152 | m_nCurDpStartPos = 0; |
153 | 153 | m_nCurSelPos = 0; |
... | ... | @@ -157,13 +157,13 @@ void historyListWindow::setLowerBunnerDataSet(void){ |
157 | 157 | strName.append(tr(m_strWindowName[ERROR_HISTORY_LOWERBUNNER ])); |
158 | 158 | m_ctrlErrorNameLabel->setText(strName); |
159 | 159 | for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_LOWERBUNNER];i++){ |
160 | - err_items[i] = &(ovenst->srvdatas->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_LOWERBUNNER][i]]); | |
160 | + err_items[i] = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_LOWERBUNNER][i]]); | |
161 | 161 | } |
162 | 162 | reloadDataset(); |
163 | 163 | } |
164 | 164 | } |
165 | 165 | |
166 | -void historyListWindow::setTotalServiceDataSet(void){ | |
166 | +void HistoryListWindow::setTotalServiceDataSet(void){ | |
167 | 167 | int i = 0; |
168 | 168 | error_item *item; |
169 | 169 | time_t firsttimebuf=0,lasttimebuf=0; |
... | ... | @@ -174,7 +174,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
174 | 174 | m_ctrlErrorNameLabel->setText(strName); |
175 | 175 | //01 상부 점화 장치 데이터 초기화 |
176 | 176 | for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_UPPERBUNNER];i++){ |
177 | - item = &(ovenst->srvdatas->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_UPPERBUNNER][i]]); | |
177 | + item = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_UPPERBUNNER][i]]); | |
178 | 178 | if(i==0) {firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt;} |
179 | 179 | else{ |
180 | 180 | if( firsttimebuf > item->first_fired && item->first_fired != 0 ) firsttimebuf = item->first_fired; |
... | ... | @@ -190,7 +190,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
190 | 190 | //02 스팀 점화 장치 데이터 초기화 |
191 | 191 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
192 | 192 | for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_STEAMBUNNER];i++){ |
193 | - item = &(ovenst->srvdatas->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_STEAMBUNNER][i]]); | |
193 | + item = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_STEAMBUNNER][i]]); | |
194 | 194 | if(i==0) {firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt;} |
195 | 195 | else{ |
196 | 196 | if( firsttimebuf > item->first_fired && item->first_fired != 0 ) firsttimebuf = item->first_fired; |
... | ... | @@ -204,7 +204,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
204 | 204 | //03 하부 점화 장치 데이터 초기화 |
205 | 205 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
206 | 206 | for(i=0;i<m_arrErrorMaxIdx[ERROR_HISTORY_LOWERBUNNER];i++){ |
207 | - item = &(ovenst->srvdatas->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_LOWERBUNNER][i]]); | |
207 | + item = &(ovenst->srvdata->err_log.values[m_arrErrorIdxs[ERROR_HISTORY_LOWERBUNNER][i]]); | |
208 | 208 | if(i==0) {firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt;} |
209 | 209 | else{ |
210 | 210 | if( firsttimebuf > item->first_fired && item->first_fired != 0 ) firsttimebuf = item->first_fired; |
... | ... | @@ -218,9 +218,9 @@ void historyListWindow::setTotalServiceDataSet(void){ |
218 | 218 | |
219 | 219 | //04 WATER |
220 | 220 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
221 | - item = &(ovenst->srvdatas->err_log.items.inner_temp_fail); | |
221 | + item = &(ovenst->srvdata->err_log.items.inner_temp_fail); | |
222 | 222 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
223 | - item = &(ovenst->srvdatas->err_log.items.qunching_temp_fail); | |
223 | + item = &(ovenst->srvdata->err_log.items.qunching_temp_fail); | |
224 | 224 | if( firsttimebuf > item->first_fired && item->first_fired != 0 ) firsttimebuf = item->first_fired; |
225 | 225 | if( lasttimebuf < item->last_fried ) lasttimebuf = item->last_fried; |
226 | 226 | firecntbuf += item->fired_cnt; |
... | ... | @@ -244,7 +244,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
244 | 244 | |
245 | 245 | //07 B1 센서 에러 |
246 | 246 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
247 | - item = &(ovenst->srvdatas->err_log.items.inner_temp_high_alarm); | |
247 | + item = &(ovenst->srvdata->err_log.items.inner_temp_high_alarm); | |
248 | 248 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
249 | 249 | total_items[5].fired_cnt = firecntbuf; |
250 | 250 | total_items[5].first_fired = firsttimebuf; |
... | ... | @@ -252,7 +252,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
252 | 252 | |
253 | 253 | //08 B2 센서 에러 |
254 | 254 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
255 | - item = &(ovenst->srvdatas->err_log.items.qunching_temp_high_alarm); | |
255 | + item = &(ovenst->srvdata->err_log.items.qunching_temp_high_alarm); | |
256 | 256 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
257 | 257 | total_items[6].fired_cnt = firecntbuf; |
258 | 258 | total_items[6].first_fired = firsttimebuf; |
... | ... | @@ -260,7 +260,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
260 | 260 | |
261 | 261 | //09 B3 센서 에러 |
262 | 262 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
263 | - item = &(ovenst->srvdatas->err_log.items.meatprove_temp1_high_alarm); | |
263 | + item = &(ovenst->srvdata->err_log.items.meatprove_temp1_high_alarm); | |
264 | 264 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
265 | 265 | total_items[7].fired_cnt = firecntbuf; |
266 | 266 | total_items[7].first_fired = firsttimebuf; |
... | ... | @@ -268,7 +268,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
268 | 268 | |
269 | 269 | //10 B4 센서 에러 |
270 | 270 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
271 | - item = &(ovenst->srvdatas->err_log.items.wall_temp1_high_alarm); | |
271 | + item = &(ovenst->srvdata->err_log.items.wall_temp1_high_alarm); | |
272 | 272 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
273 | 273 | total_items[8].fired_cnt = firecntbuf; |
274 | 274 | total_items[8].first_fired = firsttimebuf; |
... | ... | @@ -276,7 +276,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
276 | 276 | |
277 | 277 | //11 B5 센서 에러 |
278 | 278 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
279 | - item = &(ovenst->srvdatas->err_log.items.steam_gen_temp_high_alram); | |
279 | + item = &(ovenst->srvdata->err_log.items.steam_gen_temp_high_alram); | |
280 | 280 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
281 | 281 | total_items[9].fired_cnt = firecntbuf; |
282 | 282 | total_items[9].first_fired = firsttimebuf; |
... | ... | @@ -284,7 +284,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
284 | 284 | |
285 | 285 | //12 수위센 |
286 | 286 | firecntbuf = 0;firsttimebuf = 0; lasttimebuf=0; |
287 | - item = &(ovenst->srvdatas->err_log.items.water_level_sensor_fail); | |
287 | + item = &(ovenst->srvdata->err_log.items.water_level_sensor_fail); | |
288 | 288 | firsttimebuf = item->first_fired;lasttimebuf = item->last_fried;firecntbuf=item->fired_cnt; |
289 | 289 | total_items[10].fired_cnt = firecntbuf; |
290 | 290 | total_items[10].first_fired = firsttimebuf; |
... | ... | @@ -297,7 +297,7 @@ void historyListWindow::setTotalServiceDataSet(void){ |
297 | 297 | reloadDataset(); |
298 | 298 | } |
299 | 299 | |
300 | -void historyListWindow::setWindosDataSet(ERROR_HISTORY_TYPE type){ | |
300 | +void HistoryListWindow::setWindosDataSet(ERROR_HISTORY_TYPE type){ | |
301 | 301 | switch((uint16_t)type){ |
302 | 302 | case ERROR_HISTORY_UPPERBUNNER: |
303 | 303 | m_nWindowType = ERROR_HISTORY_UPPERBUNNER; |
... | ... | @@ -318,12 +318,12 @@ void historyListWindow::setWindosDataSet(ERROR_HISTORY_TYPE type){ |
318 | 318 | } |
319 | 319 | } |
320 | 320 | |
321 | -void historyListWindow::on_ctrlBackBtn_clicked() | |
321 | +void HistoryListWindow::on_ctrlBackBtn_clicked() | |
322 | 322 | { |
323 | 323 | deleteLater(); |
324 | 324 | } |
325 | 325 | |
326 | -void historyListWindow::on_ctrlUpBtn_clicked() | |
326 | +void HistoryListWindow::on_ctrlUpBtn_clicked() | |
327 | 327 | { |
328 | 328 | if(m_nCurDpStartPos == 8 && m_arrErrorMaxIdx[m_nWindowType] > 8 ){ |
329 | 329 | m_nCurDpStartPos = 0; |
... | ... | @@ -331,7 +331,7 @@ void historyListWindow::on_ctrlUpBtn_clicked() |
331 | 331 | } |
332 | 332 | } |
333 | 333 | |
334 | -void historyListWindow::on_ctrflDownBtn_clicked() | |
334 | +void HistoryListWindow::on_ctrflDownBtn_clicked() | |
335 | 335 | { |
336 | 336 | if(m_nCurDpStartPos == 0 && m_arrErrorMaxIdx[m_nWindowType] > 8){ |
337 | 337 | m_nCurDpStartPos = 8; |
... | ... | @@ -339,16 +339,16 @@ void historyListWindow::on_ctrflDownBtn_clicked() |
339 | 339 | } |
340 | 340 | } |
341 | 341 | |
342 | -void historyListWindow::on_ctrlResetBtn_clicked() | |
342 | +void HistoryListWindow::on_ctrlResetBtn_clicked() | |
343 | 343 | { |
344 | 344 | int i = 0; |
345 | 345 | OvenStatistics *ovenst = OvenStatistics::getInstance(); |
346 | 346 | for(i=0;i<MAX_ERROR_TYPE_CNT;i++){ |
347 | - ovenst->srvdatas->err_log.values[i].fired_cnt = 0; | |
348 | - ovenst->srvdatas->err_log.values[i].first_fired = 0; | |
349 | - ovenst->srvdatas->err_log.values[i].last_fried = 0; | |
347 | + ovenst->srvdata->err_log.values[i].fired_cnt = 0; | |
348 | + ovenst->srvdata->err_log.values[i].first_fired = 0; | |
349 | + ovenst->srvdata->err_log.values[i].last_fried = 0; | |
350 | 350 | } |
351 | - ovenst->srvdatas->saveServiceDatas(); | |
351 | + ovenst->srvdata->saveServiceData(); | |
352 | 352 | setWindosDataSet(m_nWindowType); |
353 | 353 | |
354 | 354 | } | ... | ... |
app/gui/oven_control/historylistwindow.h
... | ... | @@ -3,11 +3,11 @@ |
3 | 3 | |
4 | 4 | #include <QMainWindow> |
5 | 5 | #include <QLabel> |
6 | -#include "servicedatas.h" | |
6 | +#include "servicedata.h" | |
7 | 7 | #include <QPushButton> |
8 | 8 | |
9 | 9 | namespace Ui { |
10 | -class historyListWindow; | |
10 | +class HistoryListWindow; | |
11 | 11 | } |
12 | 12 | |
13 | 13 | #define MAX_DISP_ITEM 10 |
... | ... | @@ -21,13 +21,13 @@ enum ERROR_HISTORY_TYPE{ |
21 | 21 | |
22 | 22 | |
23 | 23 | |
24 | -class historyListWindow : public QMainWindow | |
24 | +class HistoryListWindow : public QMainWindow | |
25 | 25 | { |
26 | 26 | Q_OBJECT |
27 | 27 | |
28 | 28 | public: |
29 | - explicit historyListWindow(QWidget *parent = 0); | |
30 | - ~historyListWindow(); | |
29 | + explicit HistoryListWindow(QWidget *parent = 0); | |
30 | + ~HistoryListWindow(); | |
31 | 31 | void setWindosDataSet(ERROR_HISTORY_TYPE type); |
32 | 32 | |
33 | 33 | private slots: |
... | ... | @@ -42,7 +42,7 @@ private slots: |
42 | 42 | void on_ctrlResetBtn_clicked(); |
43 | 43 | |
44 | 44 | private: |
45 | - Ui::historyListWindow *ui; | |
45 | + Ui::HistoryListWindow *ui; | |
46 | 46 | |
47 | 47 | const uint8_t m_arrErrorMaxIdx[4] = {3,4,3,11}; |
48 | 48 | ... | ... |
app/gui/oven_control/historylistwindow.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>historyListWindow</class> | |
4 | - <widget class="QMainWindow" name="historyListWindow"> | |
3 | + <class>HistoryListWindow</class> | |
4 | + <widget class="QMainWindow" name="HistoryListWindow"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/mainwindow.cpp
... | ... | @@ -101,7 +101,7 @@ void MainWindow::on_washButton_clicked() |
101 | 101 | |
102 | 102 | void MainWindow::on_configButton_clicked() |
103 | 103 | { |
104 | - engineermenuwindow *w = new engineermenuwindow(this); | |
104 | + EngineerMenuWindow *w = new EngineerMenuWindow(this); | |
105 | 105 | w->setWindowModality(Qt::WindowModal); |
106 | 106 | w->showFullScreen(); |
107 | 107 | w->raise(); | ... | ... |
app/gui/oven_control/operationtimeheat.cpp
... | ... | @@ -2,61 +2,61 @@ |
2 | 2 | #include "ui_operationtimeheat.h" |
3 | 3 | #include "ovenstatics.h" |
4 | 4 | |
5 | -operationTimeHeat::operationTimeHeat(QWidget *parent) : | |
5 | +OperationTimeHeat::OperationTimeHeat(QWidget *parent) : | |
6 | 6 | QMainWindow(parent), |
7 | - ui(new Ui::operationTimeHeat) | |
7 | + ui(new Ui::OperationTimeHeat) | |
8 | 8 | { |
9 | 9 | ui->setupUi(this); |
10 | 10 | reloadUI(); |
11 | 11 | |
12 | 12 | } |
13 | 13 | |
14 | -operationTimeHeat::~operationTimeHeat() | |
14 | +OperationTimeHeat::~OperationTimeHeat() | |
15 | 15 | { |
16 | 16 | delete ui; |
17 | 17 | } |
18 | 18 | |
19 | -void operationTimeHeat::on_btnReset1_clicked() | |
19 | +void OperationTimeHeat::on_btnReset1_clicked() | |
20 | 20 | { |
21 | 21 | //스팀 가열 시간 초기화 |
22 | 22 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
23 | 23 | if(ovs!=NULL){ |
24 | - ovs->srvdatas->use_log.items.steam_heat=0; | |
25 | - ovs->srvdatas->saveServiceDatas(); | |
24 | + ovs->srvdata->use_log.items.steam_heat=0; | |
25 | + ovs->srvdata->saveServiceData(); | |
26 | 26 | reloadUI(); |
27 | 27 | } |
28 | 28 | } |
29 | 29 | |
30 | -void operationTimeHeat::on_btnReset2_clicked() | |
30 | +void OperationTimeHeat::on_btnReset2_clicked() | |
31 | 31 | { |
32 | 32 | //건열 가열 시간 초기화 |
33 | 33 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
34 | 34 | if(ovs!=NULL){ |
35 | - ovs->srvdatas->use_log.items.dry_heat=0; | |
36 | - ovs->srvdatas->use_log.items.upper_heat=0; | |
37 | - ovs->srvdatas->use_log.items.lower_heat=0; | |
38 | - ovs->srvdatas->saveServiceDatas(); | |
35 | + ovs->srvdata->use_log.items.dry_heat=0; | |
36 | + ovs->srvdata->use_log.items.upper_heat=0; | |
37 | + ovs->srvdata->use_log.items.lower_heat=0; | |
38 | + ovs->srvdata->saveServiceData(); | |
39 | 39 | reloadUI(); |
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -void operationTimeHeat::reloadUI(void){ | |
43 | +void OperationTimeHeat::reloadUI(void){ | |
44 | 44 | uint32_t timetemp; |
45 | 45 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
46 | 46 | QString strTemp=""; |
47 | 47 | if(ovs!=NULL){ |
48 | - timetemp = ovs->srvdatas->use_log.items.steam_heat; | |
48 | + timetemp = ovs->srvdata->use_log.items.steam_heat; | |
49 | 49 | strTemp.sprintf("%d h", timetemp/3600); |
50 | 50 | ui->m_ctrlLbListTime1->setText(strTemp); |
51 | - timetemp = ovs->srvdatas->use_log.items.dry_heat; | |
51 | + timetemp = ovs->srvdata->use_log.items.dry_heat; | |
52 | 52 | strTemp.sprintf("%d h", timetemp/3600); |
53 | 53 | ui->m_ctrlLbListTime2->setText(strTemp); |
54 | - qDebug() << "Steam heat time : " << ovs->srvdatas->use_log.items.steam_heat; | |
55 | - qDebug() << "Dry heat time : " << ovs->srvdatas->use_log.items.dry_heat; | |
54 | + qDebug() << "Steam heat time : " << ovs->srvdata->use_log.items.steam_heat; | |
55 | + qDebug() << "Dry heat time : " << ovs->srvdata->use_log.items.dry_heat; | |
56 | 56 | } |
57 | 57 | } |
58 | 58 | |
59 | -void operationTimeHeat::on_backButton_clicked() | |
59 | +void OperationTimeHeat::on_backButton_clicked() | |
60 | 60 | { |
61 | 61 | deleteLater(); |
62 | 62 | } | ... | ... |
app/gui/oven_control/operationtimeheat.h
... | ... | @@ -4,16 +4,16 @@ |
4 | 4 | #include <QMainWindow> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class operationTimeHeat; | |
7 | +class OperationTimeHeat; | |
8 | 8 | } |
9 | 9 | |
10 | -class operationTimeHeat : public QMainWindow | |
10 | +class OperationTimeHeat : public QMainWindow | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit operationTimeHeat(QWidget *parent = 0); | |
16 | - ~operationTimeHeat(); | |
15 | + explicit OperationTimeHeat(QWidget *parent = 0); | |
16 | + ~OperationTimeHeat(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | 19 | void on_btnReset1_clicked(); |
... | ... | @@ -23,7 +23,7 @@ private slots: |
23 | 23 | void on_backButton_clicked(); |
24 | 24 | |
25 | 25 | private: |
26 | - Ui::operationTimeHeat *ui; | |
26 | + Ui::OperationTimeHeat *ui; | |
27 | 27 | void reloadUI(void); |
28 | 28 | }; |
29 | 29 | ... | ... |
app/gui/oven_control/operationtimeheat.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>operationTimeHeat</class> | |
4 | - <widget class="QMainWindow" name="operationTimeHeat"> | |
3 | + <class>OperationTimeHeat</class> | |
4 | + <widget class="QMainWindow" name="OperationTimeHeat"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/operationtimemain.cpp
... | ... | @@ -4,40 +4,40 @@ |
4 | 4 | #include "operationtimemode.h" |
5 | 5 | #include "operationtimeparts.h" |
6 | 6 | |
7 | -operationTimeMain::operationTimeMain(QWidget *parent) : | |
7 | +OperationTimeMain::OperationTimeMain(QWidget *parent) : | |
8 | 8 | QMainWindow(parent), |
9 | - ui(new Ui::operationTimeMain) | |
9 | + ui(new Ui::OperationTimeMain) | |
10 | 10 | { |
11 | 11 | ui->setupUi(this); |
12 | 12 | } |
13 | 13 | |
14 | -operationTimeMain::~operationTimeMain() | |
14 | +OperationTimeMain::~OperationTimeMain() | |
15 | 15 | { |
16 | 16 | delete ui; |
17 | 17 | } |
18 | 18 | |
19 | -void operationTimeMain::on_btnHeatPartTime_clicked() | |
19 | +void OperationTimeMain::on_btnHeatPartTime_clicked() | |
20 | 20 | { |
21 | - operationTimeHeat* w = new operationTimeHeat(); | |
21 | + OperationTimeHeat* w = new OperationTimeHeat(); | |
22 | 22 | w->setWindowModality(Qt::WindowModal); |
23 | 23 | w->showFullScreen(); |
24 | 24 | } |
25 | 25 | |
26 | -void operationTimeMain::on_btnModeTime_clicked() | |
26 | +void OperationTimeMain::on_btnModeTime_clicked() | |
27 | 27 | { |
28 | - operationTimeMode* w = new operationTimeMode(); | |
28 | + OperationTimeMode* w = new OperationTimeMode(); | |
29 | 29 | w->setWindowModality(Qt::WindowModal); |
30 | 30 | w->showFullScreen(); |
31 | 31 | } |
32 | 32 | |
33 | -void operationTimeMain::on_btnPartsTime_clicked() | |
33 | +void OperationTimeMain::on_btnPartsTime_clicked() | |
34 | 34 | { |
35 | - operationTimeParts*w = new operationTimeParts(); | |
35 | + OperationTimeParts*w = new OperationTimeParts(); | |
36 | 36 | w->setWindowModality(Qt::WindowModal); |
37 | 37 | w->showFullScreen(); |
38 | 38 | } |
39 | 39 | |
40 | -void operationTimeMain::on_backButton_clicked() | |
40 | +void OperationTimeMain::on_backButton_clicked() | |
41 | 41 | { |
42 | 42 | deleteLater(); |
43 | 43 | } | ... | ... |
app/gui/oven_control/operationtimemain.h
... | ... | @@ -4,16 +4,16 @@ |
4 | 4 | #include <QMainWindow> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class operationTimeMain; | |
7 | +class OperationTimeMain; | |
8 | 8 | } |
9 | 9 | |
10 | -class operationTimeMain : public QMainWindow | |
10 | +class OperationTimeMain : public QMainWindow | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit operationTimeMain(QWidget *parent = 0); | |
16 | - ~operationTimeMain(); | |
15 | + explicit OperationTimeMain(QWidget *parent = 0); | |
16 | + ~OperationTimeMain(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | 19 | void on_btnHeatPartTime_clicked(); |
... | ... | @@ -25,7 +25,7 @@ private slots: |
25 | 25 | void on_backButton_clicked(); |
26 | 26 | |
27 | 27 | private: |
28 | - Ui::operationTimeMain *ui; | |
28 | + Ui::OperationTimeMain *ui; | |
29 | 29 | }; |
30 | 30 | |
31 | 31 | #endif // OPERATIONTIMEMAIN_H | ... | ... |
app/gui/oven_control/operationtimemain.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>operationTimeMain</class> | |
4 | - <widget class="QMainWindow" name="operationTimeMain"> | |
3 | + <class>OperationTimeMain</class> | |
4 | + <widget class="QMainWindow" name="OperationTimeMain"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/operationtimemode.cpp
... | ... | @@ -2,81 +2,81 @@ |
2 | 2 | #include "ui_operationtimemode.h" |
3 | 3 | #include "ovenstatics.h" |
4 | 4 | |
5 | -operationTimeMode::operationTimeMode(QWidget *parent) : | |
5 | +OperationTimeMode::OperationTimeMode(QWidget *parent) : | |
6 | 6 | QMainWindow(parent), |
7 | - ui(new Ui::operationTimeMode) | |
7 | + ui(new Ui::OperationTimeMode) | |
8 | 8 | { |
9 | 9 | ui->setupUi(this); |
10 | 10 | reloadUi(); |
11 | 11 | } |
12 | 12 | |
13 | -operationTimeMode::~operationTimeMode() | |
13 | +OperationTimeMode::~OperationTimeMode() | |
14 | 14 | { |
15 | 15 | delete ui; |
16 | 16 | } |
17 | 17 | |
18 | -void operationTimeMode::on_backButton_clicked() | |
18 | +void OperationTimeMode::on_backButton_clicked() | |
19 | 19 | { |
20 | 20 | deleteLater(); |
21 | 21 | } |
22 | 22 | |
23 | 23 | |
24 | -void operationTimeMode::reloadUi(void){ | |
24 | +void OperationTimeMode::reloadUi(void){ | |
25 | 25 | uint32_t timetemp; |
26 | 26 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
27 | 27 | QString strTemp=""; |
28 | 28 | uint32_t totaltime; |
29 | 29 | if(ovs!=NULL){ |
30 | 30 | //건열 조리 모드 |
31 | - timetemp = ovs->srvdatas->use_log.items.cook_dry_mode; | |
31 | + timetemp = ovs->srvdata->use_log.items.cook_dry_mode; | |
32 | 32 | totaltime += timetemp; |
33 | 33 | strTemp.sprintf("%d h", timetemp/3600); |
34 | 34 | ui->m_ctrlLbListTime1->setText(strTemp); |
35 | 35 | qDebug() << "Dry Cook Time : " <<timetemp; |
36 | 36 | //스팀 조리 모드 |
37 | - timetemp = ovs->srvdatas->use_log.items.cook_steam_mode; | |
37 | + timetemp = ovs->srvdata->use_log.items.cook_steam_mode; | |
38 | 38 | totaltime += timetemp; |
39 | 39 | strTemp.sprintf("%d h", timetemp/3600); |
40 | 40 | ui->m_ctrlLbListTime2->setText(strTemp); |
41 | 41 | qDebug() << "Steam Cook Time : " <<timetemp; |
42 | 42 | //콤비 조리 모드 |
43 | - timetemp = ovs->srvdatas->use_log.items.cook_combi_mode; | |
43 | + timetemp = ovs->srvdata->use_log.items.cook_combi_mode; | |
44 | 44 | totaltime += timetemp; |
45 | 45 | strTemp.sprintf("%d h", timetemp/3600); |
46 | 46 | ui->m_ctrlLbListTime3->setText(strTemp); |
47 | 47 | qDebug() << "Combi Cook Time : " <<timetemp; |
48 | 48 | //세제없이 헹굼 |
49 | - timetemp = ovs->srvdatas->use_log.items.wash_mode_nocleanser; | |
49 | + timetemp = ovs->srvdata->use_log.items.wash_mode_nocleanser; | |
50 | 50 | totaltime += timetemp; |
51 | 51 | strTemp.sprintf("%d h", timetemp/3600); |
52 | 52 | ui->m_ctrlLbListTime4->setText(strTemp); |
53 | 53 | qDebug() << "Wash Nocleanser Time : " <<timetemp; |
54 | 54 | //간이 세척 |
55 | - timetemp = ovs->srvdatas->use_log.items.wash_mode_simple; | |
55 | + timetemp = ovs->srvdata->use_log.items.wash_mode_simple; | |
56 | 56 | totaltime += timetemp; |
57 | 57 | strTemp.sprintf("%d h", timetemp/3600); |
58 | 58 | ui->m_ctrlLbListTime5->setText(strTemp); |
59 | 59 | qDebug() << "Wash Simple Time : " <<timetemp; |
60 | 60 | //표준 세척 |
61 | - timetemp = ovs->srvdatas->use_log.items.wash_mode_standard; | |
61 | + timetemp = ovs->srvdata->use_log.items.wash_mode_standard; | |
62 | 62 | totaltime += timetemp; |
63 | 63 | strTemp.sprintf("%d h", timetemp/3600); |
64 | 64 | ui->m_ctrlLbListTime6->setText(strTemp); |
65 | 65 | qDebug() << "Wash Standard Time : " <<timetemp; |
66 | 66 | //강세척 |
67 | - timetemp = ovs->srvdatas->use_log.items.wash_mode_strong; | |
67 | + timetemp = ovs->srvdata->use_log.items.wash_mode_strong; | |
68 | 68 | totaltime += timetemp; |
69 | 69 | strTemp.sprintf("%d h", timetemp/3600); |
70 | 70 | ui->m_ctrlLbListTime7->setText(strTemp); |
71 | 71 | qDebug() << "Wash Strong Time : " <<timetemp; |
72 | 72 | //고속 세척 |
73 | - timetemp = ovs->srvdatas->use_log.items.wash_mode_speed; | |
73 | + timetemp = ovs->srvdata->use_log.items.wash_mode_speed; | |
74 | 74 | totaltime += timetemp; |
75 | 75 | strTemp.sprintf("%d h", timetemp/3600); |
76 | 76 | ui->m_ctrlLbListTime8->setText(strTemp); |
77 | 77 | qDebug() << "Wash Speed Time : " <<timetemp; |
78 | 78 | //쿨다운 |
79 | - timetemp = ovs->srvdatas->use_log.items.cooldown_mode; | |
79 | + timetemp = ovs->srvdata->use_log.items.cooldown_mode; | |
80 | 80 | totaltime += timetemp; |
81 | 81 | strTemp.sprintf("%d h", timetemp/3600); |
82 | 82 | ui->m_ctrlLbListTime9->setText(strTemp); | ... | ... |
app/gui/oven_control/operationtimemode.h
... | ... | @@ -4,22 +4,22 @@ |
4 | 4 | #include <QMainWindow> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class operationTimeMode; | |
7 | +class OperationTimeMode; | |
8 | 8 | } |
9 | 9 | |
10 | -class operationTimeMode : public QMainWindow | |
10 | +class OperationTimeMode : public QMainWindow | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit operationTimeMode(QWidget *parent = 0); | |
16 | - ~operationTimeMode(); | |
15 | + explicit OperationTimeMode(QWidget *parent = 0); | |
16 | + ~OperationTimeMode(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | 19 | void on_backButton_clicked(); |
20 | 20 | |
21 | 21 | private: |
22 | - Ui::operationTimeMode *ui; | |
22 | + Ui::OperationTimeMode *ui; | |
23 | 23 | void reloadUi(void); |
24 | 24 | }; |
25 | 25 | ... | ... |
app/gui/oven_control/operationtimemode.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>operationTimeMode</class> | |
4 | - <widget class="QMainWindow" name="operationTimeMode"> | |
3 | + <class>OperationTimeMode</class> | |
4 | + <widget class="QMainWindow" name="OperationTimeMode"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/operationtimeparts.cpp
... | ... | @@ -3,9 +3,9 @@ |
3 | 3 | #include "ui_operationtimeparts.h" |
4 | 4 | #include "ovenstatics.h" |
5 | 5 | |
6 | -operationTimeParts::operationTimeParts(QWidget *parent) : | |
6 | +OperationTimeParts::OperationTimeParts(QWidget *parent) : | |
7 | 7 | QMainWindow(parent), |
8 | - ui(new Ui::operationTimeParts) | |
8 | + ui(new Ui::OperationTimeParts) | |
9 | 9 | { |
10 | 10 | int i=0; |
11 | 11 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
... | ... | @@ -47,7 +47,7 @@ operationTimeParts::operationTimeParts(QWidget *parent) : |
47 | 47 | if(ovs != NULL){ |
48 | 48 | for( i =0;i<OPERATION_TIME_PARTS_MAX_ITEM;i++){ |
49 | 49 | if(m_arrPartItemIdxs[i] != 0xffff){ |
50 | - m_arrUseItems[i] = &(ovs->srvdatas->use_log.values[m_arrPartItemIdxs[i]]); | |
50 | + m_arrUseItems[i] = &(ovs->srvdata->use_log.values[m_arrPartItemIdxs[i]]); | |
51 | 51 | } |
52 | 52 | else m_arrUseItems[i] = NULL; |
53 | 53 | } |
... | ... | @@ -55,17 +55,17 @@ operationTimeParts::operationTimeParts(QWidget *parent) : |
55 | 55 | reloadUi(); |
56 | 56 | } |
57 | 57 | |
58 | -operationTimeParts::~operationTimeParts() | |
58 | +OperationTimeParts::~OperationTimeParts() | |
59 | 59 | { |
60 | 60 | delete ui; |
61 | 61 | } |
62 | 62 | |
63 | -void operationTimeParts::on_backButton_clicked() | |
63 | +void OperationTimeParts::on_backButton_clicked() | |
64 | 64 | { |
65 | 65 | deleteLater(); |
66 | 66 | } |
67 | 67 | |
68 | -void operationTimeParts::reloadUi(void){ | |
68 | +void OperationTimeParts::reloadUi(void){ | |
69 | 69 | uint32_t timetemp; |
70 | 70 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
71 | 71 | QString strTemp=""; |
... | ... | @@ -90,12 +90,12 @@ void operationTimeParts::reloadUi(void){ |
90 | 90 | } |
91 | 91 | } |
92 | 92 | |
93 | -void operationTimeParts::on_btnReset_2_clicked() | |
93 | +void OperationTimeParts::on_btnReset_2_clicked() | |
94 | 94 | { |
95 | 95 | |
96 | 96 | } |
97 | 97 | |
98 | -void operationTimeParts::on_btnResets_clicked(int idx){ | |
98 | +void OperationTimeParts::on_btnResets_clicked(int idx){ | |
99 | 99 | qDebug() << "PUSH BUTTON " << idx; |
100 | 100 | if(idx < OPERATION_TIME_CONTROL_MAX){ |
101 | 101 | if(m_arrUseItems[idx] !=NULL){ | ... | ... |
app/gui/oven_control/operationtimeparts.h
... | ... | @@ -5,22 +5,22 @@ |
5 | 5 | #include <qlabel.h> |
6 | 6 | #include <qbuttongroup.h> |
7 | 7 | #include <qpushbutton.h> |
8 | -#include "servicedatas.h" | |
8 | +#include "servicedata.h" | |
9 | 9 | |
10 | 10 | #define OPERATION_TIME_CONTROL_MAX 11 |
11 | 11 | #define OPERATION_TIME_PARTS_MAX_ITEM 10 |
12 | 12 | |
13 | 13 | namespace Ui { |
14 | -class operationTimeParts; | |
14 | +class OperationTimeParts; | |
15 | 15 | } |
16 | 16 | |
17 | -class operationTimeParts : public QMainWindow | |
17 | +class OperationTimeParts : public QMainWindow | |
18 | 18 | { |
19 | 19 | Q_OBJECT |
20 | 20 | |
21 | 21 | public: |
22 | - explicit operationTimeParts(QWidget *parent = 0); | |
23 | - ~operationTimeParts(); | |
22 | + explicit OperationTimeParts(QWidget *parent = 0); | |
23 | + ~OperationTimeParts(); | |
24 | 24 | |
25 | 25 | private slots: |
26 | 26 | void on_backButton_clicked(); |
... | ... | @@ -40,7 +40,7 @@ private: |
40 | 40 | QPushButton* m_arrResetBtn[OPERATION_TIME_CONTROL_MAX]; |
41 | 41 | QButtonGroup* m_btnGrops; |
42 | 42 | |
43 | - Ui::operationTimeParts *ui; | |
43 | + Ui::OperationTimeParts *ui; | |
44 | 44 | void reloadUi(void); |
45 | 45 | }; |
46 | 46 | ... | ... |
app/gui/oven_control/operationtimeparts.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>operationTimeParts</class> | |
4 | - <widget class="QMainWindow" name="operationTimeParts"> | |
3 | + <class>OperationTimeParts</class> | |
4 | + <widget class="QMainWindow" name="OperationTimeParts"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/oven_control.pro
... | ... | @@ -44,7 +44,6 @@ SOURCES += main.cpp\ |
44 | 44 | cooldownpopup.cpp \ |
45 | 45 | engineermenuwindow.cpp \ |
46 | 46 | ovenstatics.cpp \ |
47 | - servicedatas.cpp \ | |
48 | 47 | popupwindow.cpp \ |
49 | 48 | cookbook.cpp \ |
50 | 49 | define.cpp \ |
... | ... | @@ -61,7 +60,8 @@ SOURCES += main.cpp\ |
61 | 60 | realtimepartswindow.cpp \ |
62 | 61 | realtimesensorwindow.cpp \ |
63 | 62 | bulletindicator.cpp \ |
64 | - soundplayer.cpp | |
63 | + soundplayer.cpp \ | |
64 | + servicedata.cpp | |
65 | 65 | |
66 | 66 | HEADERS += mainwindow.h \ |
67 | 67 | cook.h \ |
... | ... | @@ -95,7 +95,6 @@ HEADERS += mainwindow.h \ |
95 | 95 | cooldownpopup.h \ |
96 | 96 | engineermenuwindow.h \ |
97 | 97 | ovenstatics.h \ |
98 | - servicedatas.h \ | |
99 | 98 | popupwindow.h \ |
100 | 99 | cookbook.h \ |
101 | 100 | define.h \ |
... | ... | @@ -112,7 +111,8 @@ HEADERS += mainwindow.h \ |
112 | 111 | realtimepartswindow.h \ |
113 | 112 | realtimesensorwindow.h \ |
114 | 113 | bulletindicator.h \ |
115 | - soundplayer.h | |
114 | + soundplayer.h \ | |
115 | + servicedata.h | |
116 | 116 | |
117 | 117 | FORMS += mainwindow.ui \ |
118 | 118 | manualcookwindow.ui \ | ... | ... |
app/gui/oven_control/ovenstatics.cpp
... | ... | @@ -49,12 +49,12 @@ OvenStatistics::OvenStatistics(QObject* parent) :QObject(parent) |
49 | 49 | |
50 | 50 | curSensorValue[12].itemp = 100; |
51 | 51 | |
52 | - srvdatas = new servicedatas(); | |
53 | - srvdatas->loadServiceDatas(); | |
52 | + srvdata = new ServiceData(); | |
53 | + srvdata->loadServiceData(); | |
54 | 54 | } |
55 | 55 | |
56 | 56 | OvenStatistics::~OvenStatistics(){ |
57 | - delete srvdatas; | |
57 | + delete srvdata; | |
58 | 58 | } |
59 | 59 | |
60 | 60 | |
... | ... | @@ -73,7 +73,7 @@ void OvenStatistics::onDataChanged() |
73 | 73 | if(oven->cooking() && control.system){ |
74 | 74 | if(state.door_state ==1 && curdoorstate==0){ |
75 | 75 | //door error |
76 | - item = &(srvdatas->err_log.items.door); | |
76 | + item = &(srvdata->err_log.items.door); | |
77 | 77 | item->fired_cnt+=1; |
78 | 78 | if(item->first_fired==0)item->first_fired = ltime; |
79 | 79 | item->last_fried = ltime; |
... | ... | @@ -111,65 +111,65 @@ void OvenStatistics::processSensorError(uint16_t errflag, time_t ltime){ |
111 | 111 | else state = SYS_ON_COOK_OFF; |
112 | 112 | |
113 | 113 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_1)){ |
114 | - item = &(srvdatas->err_log.items.inner_temp_fail); | |
114 | + item = &(srvdata->err_log.items.inner_temp_fail); | |
115 | 115 | strTitle = tr("내부 온도 이상 발생"); |
116 | 116 | strMsg = tr("내부 온도 센서에 이상이 발생하였습니다."); |
117 | 117 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_1],strMsg,strTitle, ltime); |
118 | 118 | } |
119 | 119 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_2)){ |
120 | - item = &(srvdatas->err_log.items.qunching_temp_fail); | |
120 | + item = &(srvdata->err_log.items.qunching_temp_fail); | |
121 | 121 | strTitle = tr("퀀칭 온도 이상 발생"); |
122 | 122 | strMsg = tr("퀀칭 온도에 이상이 발생하였습니다."); |
123 | 123 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_2],strMsg,strTitle, ltime); |
124 | 124 | } |
125 | 125 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_3)){ |
126 | 126 | //Reserved allerrornoe 설정 |
127 | - item = &(srvdatas->err_log.items.qunching_temp_fail); | |
127 | + item = &(srvdata->err_log.items.qunching_temp_fail); | |
128 | 128 | strTitle = tr("퀀칭 온도 이상 발생"); |
129 | 129 | strMsg = tr("퀀칭 온도 센서에 이상이 발생하였습니다."); |
130 | 130 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_3],strMsg,strTitle, ltime); |
131 | 131 | } |
132 | 132 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_4)){ |
133 | - item = &(srvdatas->err_log.items.wall_temp1_fail); | |
133 | + item = &(srvdata->err_log.items.wall_temp1_fail); | |
134 | 134 | strTitle = tr("벽면 온도 이상 발생"); |
135 | 135 | strMsg = tr("벽면 온도 센서에 이상이 발생하였습니다."); |
136 | 136 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_4],strMsg,strTitle, ltime); |
137 | 137 | } |
138 | 138 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_5)){ |
139 | - item = &(srvdatas->err_log.items.steam_gen_temp_fail); | |
139 | + item = &(srvdata->err_log.items.steam_gen_temp_fail); | |
140 | 140 | strTitle = tr("스팀제네레이터 온도 이상 발생"); |
141 | 141 | strMsg = tr("스팀제네레이터 온도 센서에 이상이 발생하였습니다."); |
142 | 142 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_5],strMsg,strTitle, ltime); |
143 | 143 | } |
144 | 144 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_6)){ |
145 | - item = &(srvdatas->err_log.items.meatprove_temp1_fail); | |
145 | + item = &(srvdata->err_log.items.meatprove_temp1_fail); | |
146 | 146 | strTitle = tr("미트프로브 온도 이상 발생"); |
147 | 147 | strMsg = tr("미트프로브 온도 센서에 이상이 발생하였습니다."); |
148 | 148 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_6],strMsg,strTitle, ltime); |
149 | 149 | } |
150 | 150 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_7)){ |
151 | 151 | //Reseved |
152 | - item = &(srvdatas->err_log.items.meatprove_temp2_fail); | |
152 | + item = &(srvdata->err_log.items.meatprove_temp2_fail); | |
153 | 153 | strTitle = tr("미트프로브2 온도 이상 발생"); |
154 | 154 | strMsg = tr("미트프로브2 온도 센서에 이상이 발생하였습니다."); |
155 | 155 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_7],strMsg , strTitle, ltime); |
156 | 156 | } |
157 | 157 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_8)){ |
158 | 158 | //Reserved |
159 | - item = &(srvdatas->err_log.items.meatprove_temp3_fail); | |
159 | + item = &(srvdata->err_log.items.meatprove_temp3_fail); | |
160 | 160 | strMsg = tr("미트프로브3 온도 센서에 이상이 발생하였습니다."); |
161 | 161 | strTitle = tr("미트프로브3 온도 이상 발생"); |
162 | 162 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_8],strMsg,strTitle, ltime); |
163 | 163 | } |
164 | 164 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_9)){ |
165 | 165 | //Reserved |
166 | - item = &(srvdatas->err_log.items.meatprove_temp4_fail); | |
166 | + item = &(srvdata->err_log.items.meatprove_temp4_fail); | |
167 | 167 | strMsg = tr("미트프로브4 온도 센서에 이상이 발생하였습니다."); |
168 | 168 | strTitle = tr("미트프로브4 온도 이상 발생"); |
169 | 169 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_9],strMsg,strTitle, ltime); |
170 | 170 | } |
171 | 171 | if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_10)){ |
172 | - item = &(srvdatas->err_log.items.pcb_temp_fail); | |
172 | + item = &(srvdata->err_log.items.pcb_temp_fail); | |
173 | 173 | strMsg = tr("PCB 온도 센서에 이상이 발생하였습니다."); |
174 | 174 | strTitle = tr("PCB 온도 이상 발생"); |
175 | 175 | processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_10],strMsg,strTitle, ltime); |
... | ... | @@ -186,31 +186,31 @@ void OvenStatistics::processCommError(uint16_t errflag, time_t ltime){ |
186 | 186 | else state = SYS_ON_COOK_OFF; |
187 | 187 | |
188 | 188 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){ |
189 | - item = &(srvdatas->err_log.items.upper_pan_fail); | |
189 | + item = &(srvdata->err_log.items.upper_pan_fail); | |
190 | 190 | strMsg = tr("상부 송풍기 이상 발생"); |
191 | 191 | strTitle = tr("상부 송풍기 이상 발생"); |
192 | 192 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER1],strMsg,strTitle, ltime); |
193 | 193 | } |
194 | 194 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER2)){ |
195 | - item = &(srvdatas->err_log.items.lower_pan_fail); | |
195 | + item = &(srvdata->err_log.items.lower_pan_fail); | |
196 | 196 | strMsg = tr("하부 송풍기 이상 발생"); |
197 | 197 | strTitle = tr("하부 송풍기 이상 발생"); |
198 | 198 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); |
199 | 199 | } |
200 | 200 | if(errflag & MAKE_MASK(COMM_ERR_BUNNER3)){ |
201 | - item = &(srvdatas->err_log.items.steam_pan_fail); | |
201 | + item = &(srvdata->err_log.items.steam_pan_fail); | |
202 | 202 | strMsg = tr("스팀 송풍기 이상 발생"); |
203 | 203 | strTitle = tr("스팀 송풍기 이상 발생"); |
204 | 204 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER3],strMsg,strTitle, ltime); |
205 | 205 | } |
206 | 206 | if(errflag & MAKE_MASK(COMM_ERR_LOWERFAN)){ |
207 | - item = &(srvdatas->err_log.items.lower_motor_fail); | |
207 | + item = &(srvdata->err_log.items.lower_motor_fail); | |
208 | 208 | strMsg = tr("하부 모터 컨트롤러 이상 발생"); |
209 | 209 | strTitle = tr("하부 모터 컨트롤러 이상 발생"); |
210 | 210 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); |
211 | 211 | } |
212 | 212 | if(errflag & MAKE_MASK(COMM_ERR_UPPERFAN)){ |
213 | - item = &(srvdatas->err_log.items.upper_motor_fail); | |
213 | + item = &(srvdata->err_log.items.upper_motor_fail); | |
214 | 214 | strMsg = tr("상부 모터 컨트롤러 이상 발생"); |
215 | 215 | strTitle = tr("상부 모터 컨트롤러 이상 발생"); |
216 | 216 | processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,strTitle, ltime); |
... | ... | @@ -228,66 +228,66 @@ void OvenStatistics::processSystemError(uint16_t errflag,time_t ltime){ |
228 | 228 | |
229 | 229 | if( errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER1)){ |
230 | 230 | //버너 컨트롤러 1 착화 이상 |
231 | - item = &(srvdatas->err_log.items.upper_fire_fail); | |
231 | + item = &(srvdata->err_log.items.upper_fire_fail); | |
232 | 232 | strMsg = tr("상부 버너 착하가 되지 않습니다."); |
233 | 233 | strTitle = tr("상부 버너 착하 이상 발생"); |
234 | 234 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_FIRE_TRIGGER1],strMsg,strTitle,ltime); |
235 | 235 | } |
236 | 236 | if(errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER2)){ |
237 | 237 | //버너 컨트롤러 2 착화 이상 |
238 | - item = &(srvdatas->err_log.items.lower_fire_fail); | |
238 | + item = &(srvdata->err_log.items.lower_fire_fail); | |
239 | 239 | strMsg = tr("하부 버너 착하가 되지 않습니다."); |
240 | 240 | strTitle = tr("하부 버너 착하 이상 발생"); |
241 | 241 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_FIRE_TRIGGER2],strMsg,strTitle,ltime); |
242 | 242 | } |
243 | 243 | if(errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER3)){ |
244 | - item = &(srvdatas->err_log.items.steam_fire_fail); | |
244 | + item = &(srvdata->err_log.items.steam_fire_fail); | |
245 | 245 | strMsg = tr("스팀 버너 착하가 되지 않습니다."); |
246 | 246 | strMsg = tr("스팀 버너 착하 이상 발생"); |
247 | 247 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_FIRE_TRIGGER3],strMsg,strTitle,ltime); |
248 | 248 | } |
249 | 249 | if(errflag & MAKE_MASK(SYS_ERR_OVNE_TEMP_ALARM)){ |
250 | - item = &(srvdatas->err_log.items.inner_temp_high_alarm); | |
250 | + item = &(srvdata->err_log.items.inner_temp_high_alarm); | |
251 | 251 | strMsg = tr("내부 온도가 과열되었습니다."); |
252 | 252 | strTitle = tr("내부 온도 과열 발생"); |
253 | 253 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_OVNE_TEMP_ALARM],strMsg,strTitle,ltime); |
254 | 254 | } |
255 | 255 | if(errflag & MAKE_MASK(SYS_ERR_QUN_TEMP_ALARM)){ |
256 | 256 | //퀀칭 온도 센서 과열 |
257 | - item = &(srvdatas->err_log.items.qunching_temp_high_alarm); | |
257 | + item = &(srvdata->err_log.items.qunching_temp_high_alarm); | |
258 | 258 | strTitle = tr("퀀칭 온도 센서 이상 발생"); |
259 | 259 | strMsg = tr("퀀칭 온도 센서가 과열되었습니다"); |
260 | 260 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_QUN_TEMP_ALARM],strMsg,strTitle,ltime); |
261 | 261 | } |
262 | 262 | if(errflag & MAKE_MASK(SYS_ERR_CENTER_TEMP_ALARM)){ |
263 | 263 | //중심 온도 과열 |
264 | - item = &(srvdatas->err_log.items.meatprove_temp1_high_alarm); | |
264 | + item = &(srvdata->err_log.items.meatprove_temp1_high_alarm); | |
265 | 265 | strTitle = tr("미트프로브 온도 센서 이상 발생."); |
266 | 266 | strMsg = tr("미트프로브 온도 센서 과열되었습니다."); |
267 | 267 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_CENTER_TEMP_ALARM],strMsg,strTitle,ltime); |
268 | 268 | } |
269 | 269 | if(errflag & MAKE_MASK(SYS_ERR_WALL_TEMP_ALARM)){ |
270 | - item = &(srvdatas->err_log.items.wall_temp1_high_alarm); | |
270 | + item = &(srvdata->err_log.items.wall_temp1_high_alarm); | |
271 | 271 | strTitle = tr("벽면 온도 센서 이상 발생."); |
272 | 272 | strMsg = tr("벽면 온도 센서가 과열 되었습니다."); |
273 | 273 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_WALL_TEMP_ALARM],strMsg,strTitle,ltime); |
274 | 274 | } |
275 | 275 | if(errflag & MAKE_MASK(SYS_ERR_STAM_TEMP_ALARM)){ |
276 | - item = &(srvdatas->err_log.items.steam_gen_temp_high_alram); | |
276 | + item = &(srvdata->err_log.items.steam_gen_temp_high_alram); | |
277 | 277 | strTitle = tr("스팀제네레이터 온도 과열 발생."); |
278 | 278 | strMsg = tr("스팀제네레이터 온도 센서 과열이 발생되었습니다."); |
279 | 279 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_STAM_TEMP_ALARM],strMsg,strTitle,ltime); |
280 | 280 | } |
281 | 281 | if(errflag & MAKE_MASK(SYS_ERR_WATER_SPLY_FAIL)){ |
282 | 282 | //급수 이상 -> 유량 센서 이상 |
283 | - item = &(srvdatas->err_log.items.water_level_sensor_fail); | |
283 | + item = &(srvdata->err_log.items.water_level_sensor_fail); | |
284 | 284 | strTitle = tr("급수 이상 발생"); |
285 | 285 | strMsg = tr("급수가 되지 않습니다."); |
286 | 286 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_SPLY_FAIL],strMsg,strTitle,ltime); |
287 | 287 | } |
288 | 288 | if(errflag & MAKE_MASK(SYS_ERR_WATER_LEVEL_FAIL)){ |
289 | 289 | //급수 이상 -> 수위 센서 이상 |
290 | - item = &(srvdatas->err_log.items.water_level_sensor_fail); | |
290 | + item = &(srvdata->err_log.items.water_level_sensor_fail); | |
291 | 291 | strTitle = tr("급수 이상 발생"); |
292 | 292 | strMsg = tr("급수가 되지 않습니다."); |
293 | 293 | processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_LEVEL_FAIL],strMsg,strTitle,ltime); |
... | ... | @@ -314,7 +314,7 @@ void OvenStatistics::oneSecTimerFired(void){ |
314 | 314 | |
315 | 315 | nOneSecCnt++; |
316 | 316 | if( (nOneSecCnt % 10) ==0 ) { |
317 | - srvdatas->saveServiceDatas(); | |
317 | + srvdata->saveServiceData(); | |
318 | 318 | qDebug()<<"statics data saved"; |
319 | 319 | } |
320 | 320 | |
... | ... | @@ -325,82 +325,82 @@ void OvenStatistics::oneSecTimerFired(void){ |
325 | 325 | } |
326 | 326 | //가열부 시간 측정 |
327 | 327 | if( (state.onoff_state1 & LOAD_STATE1_STEAM_BUNNER) !=0){ |
328 | - srvdatas->use_log.items.steam_heat +=1; | |
328 | + srvdata->use_log.items.steam_heat +=1; | |
329 | 329 | } |
330 | 330 | if( (state.onoff_state1 & (LOAD_STATE1_UPPER_BUNNER | LOAD_STATE1_LOWER_FAN))!=0){ |
331 | - srvdatas->use_log.items.dry_heat+=1; | |
331 | + srvdata->use_log.items.dry_heat+=1; | |
332 | 332 | if(state.onoff_state1 & (LOAD_STATE1_UPPER_BUNNER)){ |
333 | - srvdatas->use_log.items.upper_heat +=1; | |
333 | + srvdata->use_log.items.upper_heat +=1; | |
334 | 334 | } |
335 | 335 | if((state.onoff_state2 & LOAD_STATE1_LOWER_BUNNER)!=0){ |
336 | - srvdatas->use_log.items.lower_heat +=1; | |
336 | + srvdata->use_log.items.lower_heat +=1; | |
337 | 337 | } |
338 | 338 | } |
339 | 339 | //모드 시간 계산 |
340 | 340 | if(state.cooking_mode !=0){ |
341 | 341 | if(state.cooking_humidity==0){ |
342 | 342 | //건열 모드 |
343 | - srvdatas->use_log.items.cook_dry_mode+=1; | |
343 | + srvdata->use_log.items.cook_dry_mode+=1; | |
344 | 344 | } |
345 | 345 | else if(state.cooking_humidity ==100){ |
346 | 346 | //스팀모드 |
347 | - srvdatas->use_log.items.cook_steam_mode+=1; | |
347 | + srvdata->use_log.items.cook_steam_mode+=1; | |
348 | 348 | } |
349 | - else srvdatas->use_log.items.cook_combi_mode+=1; | |
349 | + else srvdata->use_log.items.cook_combi_mode+=1; | |
350 | 350 | } |
351 | 351 | if(state.cleaning_mode !=0 && state.cleaning_sate !=0){ |
352 | 352 | switch (state.cleaning_mode) { |
353 | 353 | case (uint16_t)wash_mode_nocleanser: |
354 | - srvdatas->use_log.items.wash_mode_nocleanser+=1; | |
354 | + srvdata->use_log.items.wash_mode_nocleanser+=1; | |
355 | 355 | break; |
356 | 356 | case (uint16_t)wash_mode_simple: |
357 | - srvdatas->use_log.items.wash_mode_simple+=1; | |
357 | + srvdata->use_log.items.wash_mode_simple+=1; | |
358 | 358 | break; |
359 | 359 | case (uint16_t)wash_mode_standard: |
360 | - srvdatas->use_log.items.wash_mode_standard+=1; | |
360 | + srvdata->use_log.items.wash_mode_standard+=1; | |
361 | 361 | break; |
362 | 362 | case (uint16_t)wash_mode_strong: |
363 | - srvdatas->use_log.items.wash_mode_strong+=1; | |
363 | + srvdata->use_log.items.wash_mode_strong+=1; | |
364 | 364 | break; |
365 | 365 | case (uint16_t)wash_mode_highspeed: |
366 | - srvdatas->use_log.items.wash_mode_speed+=1; | |
366 | + srvdata->use_log.items.wash_mode_speed+=1; | |
367 | 367 | break; |
368 | 368 | default: |
369 | 369 | break; |
370 | 370 | } |
371 | 371 | } |
372 | 372 | if(control.cooldown ==1){ |
373 | - srvdatas->use_log.items.cooldown_mode+=1; | |
373 | + srvdata->use_log.items.cooldown_mode+=1; | |
374 | 374 | } |
375 | 375 | //부품 |
376 | 376 | if(state.door_state !=0){ |
377 | - srvdatas->use_log.items.door_open+=1; | |
377 | + srvdata->use_log.items.door_open+=1; | |
378 | 378 | realdata.b.door_open = 1; |
379 | 379 | } |
380 | 380 | if(state.onoff_state2 !=0){ |
381 | 381 | if( (state.onoff_state2 & LOAD_STATE2_DV)!=0){ |
382 | - srvdatas->use_log.items.dv_open+=1; | |
382 | + srvdata->use_log.items.dv_open+=1; | |
383 | 383 | } |
384 | 384 | if((state.onoff_state2 & LOAD_STATE2_SSV)!=0){ |
385 | - srvdatas->use_log.items.ssv_open+=1; | |
385 | + srvdata->use_log.items.ssv_open+=1; | |
386 | 386 | } |
387 | 387 | if((state.onoff_state2 & LOAD_STATE2_QNV)!=0){ |
388 | - srvdatas->use_log.items.qnv_open+=1; | |
388 | + srvdata->use_log.items.qnv_open+=1; | |
389 | 389 | } |
390 | 390 | if((state.onoff_state2 & LOAD_STATE2_SNV)!=0){ |
391 | - srvdatas->use_log.items.snv_open+=1; | |
391 | + srvdata->use_log.items.snv_open+=1; | |
392 | 392 | } |
393 | 393 | if((state.onoff_state2 & LOAD_STATE2_SSP)!=0){ |
394 | - srvdatas->use_log.items.ssp_open+=1; | |
394 | + srvdata->use_log.items.ssp_open+=1; | |
395 | 395 | } |
396 | 396 | if((state.onoff_state2 & LOAD_STATE2_HDM)!=0){ |
397 | - srvdatas->use_log.items.hdm_open+=1; | |
397 | + srvdata->use_log.items.hdm_open+=1; | |
398 | 398 | } |
399 | 399 | if((state.onoff_state2 & LOAD_STATE2_DP)!=0){ |
400 | - srvdatas->use_log.items.dp_open+=1; | |
400 | + srvdata->use_log.items.dp_open+=1; | |
401 | 401 | } |
402 | 402 | if((state.onoff_state2 & LOAD_STATE2_UNP) !=0){ |
403 | - srvdatas->use_log.items.unp_open+=1; | |
403 | + srvdata->use_log.items.unp_open+=1; | |
404 | 404 | } |
405 | 405 | } |
406 | 406 | |
... | ... | @@ -415,74 +415,74 @@ void OvenStatistics::oneSecTimerFired(void){ |
415 | 415 | realdata.b.ssv_open = (state.onoff_state2&LOAD_STATE2_SSV)==0?0:1; |
416 | 416 | realdata.b.water_level = 0; |
417 | 417 | |
418 | - if(srvdatas->sensor_log.items.B1.high_temp.itemp < state.sensor1 ){ | |
419 | - srvdatas->sensor_log.items.B1.high_temp.itemp = state.sensor1; | |
420 | - srvdatas->sensor_log.items.B1.last_high_time = ltime; | |
418 | + if(srvdata->sensor_log.items.B1.high_temp.itemp < state.sensor1 ){ | |
419 | + srvdata->sensor_log.items.B1.high_temp.itemp = state.sensor1; | |
420 | + srvdata->sensor_log.items.B1.last_high_time = ltime; | |
421 | 421 | } |
422 | 422 | curSensorValue[0].itemp = state.sensor1; |
423 | 423 | |
424 | - if(srvdatas->sensor_log.items.B2.high_temp.itemp < state.sensor2 ){ | |
425 | - srvdatas->sensor_log.items.B2.high_temp.itemp = state.sensor2; | |
426 | - srvdatas->sensor_log.items.B2.last_high_time = ltime; | |
424 | + if(srvdata->sensor_log.items.B2.high_temp.itemp < state.sensor2 ){ | |
425 | + srvdata->sensor_log.items.B2.high_temp.itemp = state.sensor2; | |
426 | + srvdata->sensor_log.items.B2.last_high_time = ltime; | |
427 | 427 | } |
428 | 428 | curSensorValue[1].itemp = state.sensor2; |
429 | 429 | |
430 | - if(srvdatas->sensor_log.items.B3_1.high_temp.itemp < state.sensor6 ){ | |
431 | - srvdatas->sensor_log.items.B3_1.high_temp.itemp = state.sensor6; | |
432 | - srvdatas->sensor_log.items.B3_1.last_high_time = ltime; | |
430 | + if(srvdata->sensor_log.items.B3_1.high_temp.itemp < state.sensor6 ){ | |
431 | + srvdata->sensor_log.items.B3_1.high_temp.itemp = state.sensor6; | |
432 | + srvdata->sensor_log.items.B3_1.last_high_time = ltime; | |
433 | 433 | } |
434 | 434 | curSensorValue[5].itemp = state.sensor6; |
435 | 435 | |
436 | - if(srvdatas->sensor_log.items.B4.high_temp.itemp < state.sensor4 ){ | |
437 | - srvdatas->sensor_log.items.B4.high_temp.itemp = state.sensor4; | |
438 | - srvdatas->sensor_log.items.B4.last_high_time = ltime; | |
436 | + if(srvdata->sensor_log.items.B4.high_temp.itemp < state.sensor4 ){ | |
437 | + srvdata->sensor_log.items.B4.high_temp.itemp = state.sensor4; | |
438 | + srvdata->sensor_log.items.B4.last_high_time = ltime; | |
439 | 439 | } |
440 | 440 | curSensorValue[3].itemp = state.sensor4; |
441 | 441 | |
442 | - if(srvdatas->sensor_log.items.B5.high_temp.itemp < state.sensor5 ){ | |
443 | - srvdatas->sensor_log.items.B5.high_temp.itemp = state.sensor5; | |
444 | - srvdatas->sensor_log.items.B5.last_high_time = ltime; | |
442 | + if(srvdata->sensor_log.items.B5.high_temp.itemp < state.sensor5 ){ | |
443 | + srvdata->sensor_log.items.B5.high_temp.itemp = state.sensor5; | |
444 | + srvdata->sensor_log.items.B5.last_high_time = ltime; | |
445 | 445 | } |
446 | 446 | curSensorValue[4].itemp = state.sensor5; |
447 | 447 | |
448 | - if(srvdatas->sensor_log.items.B3_2.high_temp.itemp < state.sensor7 ){ | |
449 | - srvdatas->sensor_log.items.B3_2.high_temp.itemp = state.sensor7; | |
450 | - srvdatas->sensor_log.items.B3_2.last_high_time = ltime; | |
448 | + if(srvdata->sensor_log.items.B3_2.high_temp.itemp < state.sensor7 ){ | |
449 | + srvdata->sensor_log.items.B3_2.high_temp.itemp = state.sensor7; | |
450 | + srvdata->sensor_log.items.B3_2.last_high_time = ltime; | |
451 | 451 | } |
452 | 452 | curSensorValue[6].itemp = state.sensor7; |
453 | 453 | |
454 | - if(srvdatas->sensor_log.items.B3_3.high_temp.itemp < state.sensor8 ){ | |
455 | - srvdatas->sensor_log.items.B3_3.high_temp.itemp = state.sensor8; | |
456 | - srvdatas->sensor_log.items.B3_3.last_high_time = ltime; | |
454 | + if(srvdata->sensor_log.items.B3_3.high_temp.itemp < state.sensor8 ){ | |
455 | + srvdata->sensor_log.items.B3_3.high_temp.itemp = state.sensor8; | |
456 | + srvdata->sensor_log.items.B3_3.last_high_time = ltime; | |
457 | 457 | } |
458 | 458 | curSensorValue[7].itemp = state.sensor8; |
459 | 459 | |
460 | - if(srvdatas->sensor_log.items.B3_4.high_temp.itemp < state.sensor9 ){ | |
461 | - srvdatas->sensor_log.items.B3_4.high_temp.itemp = state.sensor9; | |
462 | - srvdatas->sensor_log.items.B3_4.last_high_time = ltime; | |
460 | + if(srvdata->sensor_log.items.B3_4.high_temp.itemp < state.sensor9 ){ | |
461 | + srvdata->sensor_log.items.B3_4.high_temp.itemp = state.sensor9; | |
462 | + srvdata->sensor_log.items.B3_4.last_high_time = ltime; | |
463 | 463 | } |
464 | 464 | curSensorValue[8].itemp = state.sensor9; |
465 | 465 | |
466 | - if(srvdatas->sensor_log.items.mbar1.high_temp.utemp < state.sensor11 ){ | |
467 | - srvdatas->sensor_log.items.mbar1.high_temp.utemp = state.sensor11; | |
468 | - srvdatas->sensor_log.items.mbar1.last_high_time = ltime; | |
466 | + if(srvdata->sensor_log.items.mbar1.high_temp.utemp < state.sensor11 ){ | |
467 | + srvdata->sensor_log.items.mbar1.high_temp.utemp = state.sensor11; | |
468 | + srvdata->sensor_log.items.mbar1.last_high_time = ltime; | |
469 | 469 | } |
470 | 470 | curSensorValue[10].utemp = state.sensor11; |
471 | - if(srvdatas->sensor_log.items.mbar2.high_temp.utemp < state.sensor12 ){ | |
472 | - srvdatas->sensor_log.items.mbar2.high_temp.utemp = state.sensor12; | |
473 | - srvdatas->sensor_log.items.mbar2.last_high_time = ltime; | |
471 | + if(srvdata->sensor_log.items.mbar2.high_temp.utemp < state.sensor12 ){ | |
472 | + srvdata->sensor_log.items.mbar2.high_temp.utemp = state.sensor12; | |
473 | + srvdata->sensor_log.items.mbar2.last_high_time = ltime; | |
474 | 474 | } |
475 | 475 | curSensorValue[11].utemp = state.sensor12; |
476 | 476 | |
477 | - if(srvdatas->sensor_log.items.pcb.high_temp.itemp < state.sensor13 ){ | |
478 | - srvdatas->sensor_log.items.pcb.high_temp.itemp = state.sensor13; | |
479 | - srvdatas->sensor_log.items.pcb.last_high_time = ltime; | |
477 | + if(srvdata->sensor_log.items.pcb.high_temp.itemp < state.sensor13 ){ | |
478 | + srvdata->sensor_log.items.pcb.high_temp.itemp = state.sensor13; | |
479 | + srvdata->sensor_log.items.pcb.last_high_time = ltime; | |
480 | 480 | } |
481 | 481 | curSensorValue[12].itemp = state.sensor13; |
482 | 482 | |
483 | - if(srvdatas->sensor_log.items.adc.high_temp.itemp < state.sensor14 ){ | |
484 | - srvdatas->sensor_log.items.adc.high_temp.itemp = state.sensor14; | |
485 | - srvdatas->sensor_log.items.adc.last_high_time = ltime; | |
483 | + if(srvdata->sensor_log.items.adc.high_temp.itemp < state.sensor14 ){ | |
484 | + srvdata->sensor_log.items.adc.high_temp.itemp = state.sensor14; | |
485 | + srvdata->sensor_log.items.adc.last_high_time = ltime; | |
486 | 486 | } |
487 | 487 | curSensorValue[13].itemp = state.sensor14; |
488 | 488 | |
... | ... | @@ -493,11 +493,11 @@ void OvenStatistics::oneSecTimerFired(void){ |
493 | 493 | |
494 | 494 | void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, const QString &MsgDesc, const QString &MsgTitle, time_t ltime){ |
495 | 495 | |
496 | - qDebug() << (int) (item - &(srvdatas->err_log.values[0])) << "ERROR Fired!"; | |
496 | + qDebug() << (int) (item - &(srvdata->err_log.values[0])) << "ERROR Fired!"; | |
497 | 497 | if(m_pLastErrItem == item ){ |
498 | - srvdatas->err_log.items.repeat_error.fired_cnt =item->fired_cnt; | |
499 | - srvdatas->err_log.items.repeat_error.first_fired = item->first_fired; | |
500 | - srvdatas->err_log.items.repeat_error.last_fried = item->last_fried; | |
498 | + srvdata->err_log.items.repeat_error.fired_cnt =item->fired_cnt; | |
499 | + srvdata->err_log.items.repeat_error.first_fired = item->first_fired; | |
500 | + srvdata->err_log.items.repeat_error.last_fried = item->last_fried; | |
501 | 501 | } |
502 | 502 | m_pLastErrItem = item; |
503 | 503 | |
... | ... | @@ -511,7 +511,7 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, |
511 | 511 | case error_type_popclr: |
512 | 512 | case error_type_popnonclr: |
513 | 513 | { |
514 | - errorPopupDlg *dlg = new errorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); | |
514 | + ErrorPopupDlg *dlg = new ErrorPopupDlg(QApplication::activeWindow(),MsgDesc,MsgTitle); | |
515 | 515 | dlg->exec(); |
516 | 516 | break; |
517 | 517 | } |
... | ... | @@ -519,7 +519,7 @@ void OvenStatistics::processErrorItems(error_item *item, error_exe_type errtype, |
519 | 519 | case error_type_engnonclr: |
520 | 520 | case error_type_onlyeng: |
521 | 521 | { |
522 | - engineermenuwindow *w = new engineermenuwindow(QApplication::activeWindow()); | |
522 | + EngineerMenuWindow *w = new EngineerMenuWindow(QApplication::activeWindow()); | |
523 | 523 | w->showFullScreen(); |
524 | 524 | break; |
525 | 525 | } | ... | ... |
app/gui/oven_control/ovenstatics.h
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | #include "../../app-prime-modbus/include/all_share.h" |
7 | 7 | #include "udphandler.h" |
8 | 8 | #include "oven.h" |
9 | -#include "servicedatas.h" | |
9 | +#include "servicedata.h" | |
10 | 10 | |
11 | 11 | #define SYS_STATE_MAX 4 |
12 | 12 | |
... | ... | @@ -164,7 +164,7 @@ class OvenStatistics : public QObject |
164 | 164 | { |
165 | 165 | Q_OBJECT |
166 | 166 | public: |
167 | - servicedatas* srvdatas; | |
167 | + ServiceData* srvdata; | |
168 | 168 | |
169 | 169 | static OvenStatistics* getInstance(QObject* parent = 0); |
170 | 170 | static void destroy(); | ... | ... |
app/gui/oven_control/realtimemain.cpp
... | ... | @@ -3,33 +3,33 @@ |
3 | 3 | #include "realtimepartswindow.h" |
4 | 4 | #include "realtimesensorwindow.h" |
5 | 5 | |
6 | -realtimeMain::realtimeMain(QWidget *parent) : | |
6 | +RealtimeMain::RealtimeMain(QWidget *parent) : | |
7 | 7 | QMainWindow(parent), |
8 | - ui(new Ui::realtimeMain) | |
8 | + ui(new Ui::RealtimeMain) | |
9 | 9 | { |
10 | 10 | ui->setupUi(this); |
11 | 11 | } |
12 | 12 | |
13 | -realtimeMain::~realtimeMain() | |
13 | +RealtimeMain::~RealtimeMain() | |
14 | 14 | { |
15 | 15 | delete ui; |
16 | 16 | } |
17 | 17 | |
18 | -void realtimeMain::on_btnPartsReal_clicked() | |
18 | +void RealtimeMain::on_btnPartsReal_clicked() | |
19 | 19 | { |
20 | - realtimePartsWindow* w = new realtimePartsWindow(this); | |
20 | + RealtimePartsWindow* w = new RealtimePartsWindow(this); | |
21 | 21 | w->setWindowModality(Qt::WindowModal); |
22 | 22 | w->showFullScreen(); |
23 | 23 | } |
24 | 24 | |
25 | -void realtimeMain::on_btnTemperatureReal_clicked() | |
25 | +void RealtimeMain::on_btnTemperatureReal_clicked() | |
26 | 26 | { |
27 | - realtimeSensorWindow* w = new realtimeSensorWindow(this); | |
27 | + RealtimeSensorWindow* w = new RealtimeSensorWindow(this); | |
28 | 28 | w->setWindowModality(Qt::WindowModal); |
29 | 29 | w->showFullScreen(); |
30 | 30 | } |
31 | 31 | |
32 | -void realtimeMain::on_backButton_clicked() | |
32 | +void RealtimeMain::on_backButton_clicked() | |
33 | 33 | { |
34 | 34 | deleteLater(); |
35 | 35 | } | ... | ... |
app/gui/oven_control/realtimemain.h
... | ... | @@ -4,16 +4,16 @@ |
4 | 4 | #include <QMainWindow> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class realtimeMain; | |
7 | +class RealtimeMain; | |
8 | 8 | } |
9 | 9 | |
10 | -class realtimeMain : public QMainWindow | |
10 | +class RealtimeMain : public QMainWindow | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit realtimeMain(QWidget *parent = 0); | |
16 | - ~realtimeMain(); | |
15 | + explicit RealtimeMain(QWidget *parent = 0); | |
16 | + ~RealtimeMain(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | 19 | void on_btnPartsReal_clicked(); |
... | ... | @@ -23,7 +23,7 @@ private slots: |
23 | 23 | void on_backButton_clicked(); |
24 | 24 | |
25 | 25 | private: |
26 | - Ui::realtimeMain *ui; | |
26 | + Ui::RealtimeMain *ui; | |
27 | 27 | }; |
28 | 28 | |
29 | 29 | #endif // REALTIMEMAIN_H | ... | ... |
app/gui/oven_control/realtimemain.ui
app/gui/oven_control/realtimepartswindow.cpp
... | ... | @@ -2,9 +2,9 @@ |
2 | 2 | #include "ui_realtimepartswindow.h" |
3 | 3 | #include "ovenstatics.h" |
4 | 4 | |
5 | -realtimePartsWindow::realtimePartsWindow(QWidget *parent) : | |
5 | +RealtimePartsWindow::RealtimePartsWindow(QWidget *parent) : | |
6 | 6 | QMainWindow(parent), |
7 | - ui(new Ui::realtimePartsWindow) | |
7 | + ui(new Ui::RealtimePartsWindow) | |
8 | 8 | { |
9 | 9 | ui->setupUi(this); |
10 | 10 | |
... | ... | @@ -46,17 +46,17 @@ realtimePartsWindow::realtimePartsWindow(QWidget *parent) : |
46 | 46 | |
47 | 47 | } |
48 | 48 | |
49 | -realtimePartsWindow::~realtimePartsWindow() | |
49 | +RealtimePartsWindow::~RealtimePartsWindow() | |
50 | 50 | { |
51 | 51 | delete ui; |
52 | 52 | } |
53 | 53 | |
54 | -void realtimePartsWindow::on_backButton_clicked() | |
54 | +void RealtimePartsWindow::on_backButton_clicked() | |
55 | 55 | { |
56 | 56 | deleteLater(); |
57 | 57 | } |
58 | 58 | |
59 | -void realtimePartsWindow::reloadUi(void){ | |
59 | +void RealtimePartsWindow::reloadUi(void){ | |
60 | 60 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
61 | 61 | QString strTemp = ""; |
62 | 62 | int i = 0,j=0; | ... | ... |
app/gui/oven_control/realtimepartswindow.h
... | ... | @@ -9,22 +9,22 @@ |
9 | 9 | |
10 | 10 | |
11 | 11 | namespace Ui { |
12 | -class realtimePartsWindow; | |
12 | +class RealtimePartsWindow; | |
13 | 13 | } |
14 | 14 | |
15 | -class realtimePartsWindow : public QMainWindow | |
15 | +class RealtimePartsWindow : public QMainWindow | |
16 | 16 | { |
17 | 17 | Q_OBJECT |
18 | 18 | |
19 | 19 | public: |
20 | - explicit realtimePartsWindow(QWidget *parent = 0); | |
21 | - ~realtimePartsWindow(); | |
20 | + explicit RealtimePartsWindow(QWidget *parent = 0); | |
21 | + ~RealtimePartsWindow(); | |
22 | 22 | |
23 | 23 | private slots: |
24 | 24 | void on_backButton_clicked(); |
25 | 25 | |
26 | 26 | private: |
27 | - Ui::realtimePartsWindow *ui; | |
27 | + Ui::RealtimePartsWindow *ui; | |
28 | 28 | QLabel *m_arrLbState[CONTROL_LIST_COL_MAX][CONTROL_LIST_ITEM_MAX]; |
29 | 29 | |
30 | 30 | void reloadUi(void); | ... | ... |
app/gui/oven_control/realtimepartswindow.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>realtimePartsWindow</class> | |
4 | - <widget class="QMainWindow" name="realtimePartsWindow"> | |
3 | + <class>RealtimePartsWindow</class> | |
4 | + <widget class="QMainWindow" name="RealtimePartsWindow"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/realtimesensorwindow.cpp
... | ... | @@ -2,9 +2,9 @@ |
2 | 2 | #include "ui_realtimesensorwindow.h" |
3 | 3 | #include "ovenstatics.h" |
4 | 4 | |
5 | -realtimeSensorWindow::realtimeSensorWindow(QWidget *parent) : | |
5 | +RealtimeSensorWindow::RealtimeSensorWindow(QWidget *parent) : | |
6 | 6 | QMainWindow(parent), |
7 | - ui(new Ui::realtimeSensorWindow) | |
7 | + ui(new Ui::RealtimeSensorWindow) | |
8 | 8 | { |
9 | 9 | OvenStatistics* ovs = OvenStatistics::getInstance(); |
10 | 10 | int i = 0; |
... | ... | @@ -51,17 +51,17 @@ realtimeSensorWindow::realtimeSensorWindow(QWidget *parent) : |
51 | 51 | m_arrLbState[3][8] = ui->m_ctrlLbListState_4_9; |
52 | 52 | |
53 | 53 | for(i=0;i<REALSENSOR_CONTROL_LIST_ITEM_MAX;i++){ |
54 | - m_arrSensorItems[i] = &(ovs->srvdatas->sensor_log.values[m_arrSensorItemIdxs[i]]); | |
54 | + m_arrSensorItems[i] = &(ovs->srvdata->sensor_log.values[m_arrSensorItemIdxs[i]]); | |
55 | 55 | } |
56 | 56 | reloadUi(); |
57 | 57 | } |
58 | 58 | |
59 | -realtimeSensorWindow::~realtimeSensorWindow() | |
59 | +RealtimeSensorWindow::~RealtimeSensorWindow() | |
60 | 60 | { |
61 | 61 | delete ui; |
62 | 62 | } |
63 | 63 | |
64 | -void realtimeSensorWindow::on_backButton_clicked() | |
64 | +void RealtimeSensorWindow::on_backButton_clicked() | |
65 | 65 | { |
66 | 66 | deleteLater(); |
67 | 67 | } |
... | ... | @@ -69,7 +69,7 @@ void realtimeSensorWindow::on_backButton_clicked() |
69 | 69 | uint16_t i_temp1,i_temp2; |
70 | 70 | type_temp temp_temp; |
71 | 71 | |
72 | -void realtimeSensorWindow::reloadUi(void){ | |
72 | +void RealtimeSensorWindow::reloadUi(void){ | |
73 | 73 | char strTime[64]; |
74 | 74 | QString strTemp=""; |
75 | 75 | struct tm *timeptr; | ... | ... |
app/gui/oven_control/realtimesensorwindow.h
... | ... | @@ -3,22 +3,22 @@ |
3 | 3 | |
4 | 4 | #include <QMainWindow> |
5 | 5 | #include <qlabel.h> |
6 | -#include "servicedatas.h" | |
6 | +#include "servicedata.h" | |
7 | 7 | |
8 | 8 | #define REALSENSOR_CONTROL_LIST_COL_MAX 4 |
9 | 9 | #define REALSENSOR_CONTROL_LIST_ITEM_MAX 9 |
10 | 10 | |
11 | 11 | namespace Ui { |
12 | -class realtimeSensorWindow; | |
12 | +class RealtimeSensorWindow; | |
13 | 13 | } |
14 | 14 | |
15 | -class realtimeSensorWindow : public QMainWindow | |
15 | +class RealtimeSensorWindow : public QMainWindow | |
16 | 16 | { |
17 | 17 | Q_OBJECT |
18 | 18 | |
19 | 19 | public: |
20 | - explicit realtimeSensorWindow(QWidget *parent = 0); | |
21 | - ~realtimeSensorWindow(); | |
20 | + explicit RealtimeSensorWindow(QWidget *parent = 0); | |
21 | + ~RealtimeSensorWindow(); | |
22 | 22 | |
23 | 23 | private slots: |
24 | 24 | void on_backButton_clicked(); |
... | ... | @@ -31,7 +31,7 @@ private: |
31 | 31 | 320,120,270,300,300,300,300,80,80 |
32 | 32 | }; |
33 | 33 | |
34 | - Ui::realtimeSensorWindow *ui; | |
34 | + Ui::RealtimeSensorWindow *ui; | |
35 | 35 | QLabel *m_arrLbState[REALSENSOR_CONTROL_LIST_COL_MAX][REALSENSOR_CONTROL_LIST_ITEM_MAX]; |
36 | 36 | sensor_log_item* m_arrSensorItems[REALSENSOR_CONTROL_LIST_ITEM_MAX]; |
37 | 37 | ... | ... |
app/gui/oven_control/realtimesensorwindow.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>realtimeSensorWindow</class> | |
4 | - <widget class="QMainWindow" name="realtimeSensorWindow"> | |
3 | + <class>RealtimeSensorWindow</class> | |
4 | + <widget class="QMainWindow" name="RealtimeSensorWindow"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |
app/gui/oven_control/servicedata.cpp
... | ... | @@ -0,0 +1,113 @@ |
1 | +#include "string.h" | |
2 | +#include "servicedata.h" | |
3 | +#include <QDebug> | |
4 | +#include <fcntl.h> | |
5 | +#include <unistd.h> // write(), close() | |
6 | + | |
7 | +#define FRAM_SIZE 2048 | |
8 | +#define FRAM_TEST_PROCESS 0 | |
9 | + | |
10 | +#define fRam_path "/sys/bus/spi/devices/spi0.0/fram" | |
11 | +#define INIT_FRAM 1 | |
12 | + | |
13 | + | |
14 | +ServiceData::ServiceData() | |
15 | +{ | |
16 | + qDebug()<< "Statics Data Size Report\r\n error_log size = " << sizeof(error_log) << " \r\nuse_static_log size = " << sizeof(use_statics_log) \ | |
17 | + << "\r\nsensor_statics_log size = " << sizeof(sensor_statics_log); | |
18 | + memset((void*)err_log.data,0x00,sizeof(error_log)); | |
19 | + memset((void*)use_log.data,0x00,sizeof(use_statics_log)); | |
20 | + memset((void*)sensor_log.data,0x00, sizeof(sensor_statics_log)); | |
21 | +#if INIT_FRAM == 1 | |
22 | + saveServiceData(); | |
23 | +#else | |
24 | + loadServiceData(); | |
25 | +#endif | |
26 | +} | |
27 | + | |
28 | + | |
29 | + | |
30 | +bool ServiceData::loadServiceData(void){ | |
31 | + uint8_t buffs[FRAM_SIZE]; | |
32 | + int fd; | |
33 | + | |
34 | +#if FRAM_TEST_PROCESS == 1 | |
35 | + int i; | |
36 | + memset(buffs,0x00,256); | |
37 | + for(i=0;i<256;i++){ | |
38 | + buffs[i] = i; | |
39 | + } | |
40 | + fd = open(fRam_path, O_RDWR); | |
41 | + if(fd>0){ | |
42 | + write(fd,buffs,256); | |
43 | + close(fd); | |
44 | + } | |
45 | + else{ | |
46 | + qDebug()<<"FRAM open fail!"; | |
47 | + return false; | |
48 | + } | |
49 | + i=0; | |
50 | + memset(buffs,0x00,256); | |
51 | + fd = open(fRam_path, O_RDONLY ); | |
52 | + if(fd>0){ | |
53 | + read(fd,buffs,256); | |
54 | + close(fd); | |
55 | + }else{ | |
56 | + qDebug()<<"FRAM open fail!"; | |
57 | + return false; | |
58 | + } | |
59 | + for(i=0;i<256;i++){ | |
60 | + if(i !=buffs[i]) { | |
61 | + qDebug()<<"FRAM Test Fail"; | |
62 | + return false; | |
63 | + } | |
64 | + } | |
65 | + qDebug()<<"FRAM Test Success!"; | |
66 | + return true; | |
67 | +#endif | |
68 | + | |
69 | + | |
70 | + | |
71 | + | |
72 | + | |
73 | + | |
74 | + fd = open(fRam_path, O_RDONLY ); | |
75 | + if(fd>0){ | |
76 | + memset(buffs,0x00,FRAM_SIZE); | |
77 | + read(fd,buffs,FRAM_SIZE); | |
78 | + if(buffs[sizeof(error_log) + sizeof(use_statics_log) + sizeof(sensor_statics_log)] != 0x9C){ | |
79 | + close(fd); | |
80 | + return saveServiceData(); | |
81 | + } | |
82 | + | |
83 | + qDebug() << "FRAM Read, Write Size is " << sizeof(error_log)+sizeof(use_statics_log); | |
84 | + memcpy((void*)err_log.data,buffs,sizeof(error_log)); | |
85 | + memcpy((void*)use_log.data, (void*)(&buffs[sizeof(error_log)]),sizeof(use_statics_log)); | |
86 | + memcpy((void*)sensor_log.data,(void*)(&buffs[sizeof(error_log) + sizeof(use_statics_log)]),sizeof(sensor_statics_log)); | |
87 | + close(fd); | |
88 | + }else{ | |
89 | + qDebug()<<"FRAM FILE Open fail!!"; | |
90 | + } | |
91 | + return true; | |
92 | +} | |
93 | + | |
94 | +bool ServiceData::saveServiceData(void){ | |
95 | + uint8_t buffs[FRAM_SIZE]; | |
96 | + int fd; | |
97 | + fd = open(fRam_path, O_RDWR | O_SYNC); | |
98 | + if(fd>0){ | |
99 | + memset(buffs,0x00,FRAM_SIZE); | |
100 | + memcpy(buffs,(void*)err_log.data,sizeof(error_log)); | |
101 | + memcpy((void*)(&buffs[sizeof(error_log)]),(void*)use_log.data,sizeof(use_statics_log)); | |
102 | + memcpy((void*)(&buffs[sizeof(error_log) + sizeof(use_statics_log)]),(void*)sensor_log.data,sizeof(sensor_statics_log)); | |
103 | + buffs[sizeof(error_log) + sizeof(use_statics_log) + sizeof(sensor_statics_log)] = 0x9C; | |
104 | + write(fd,buffs,FRAM_SIZE); | |
105 | + close(fd); | |
106 | + }else{ | |
107 | + qDebug()<<"FRAM FILE Open fail!!"; | |
108 | + return false; | |
109 | + } | |
110 | + return true; | |
111 | +} | |
112 | + | |
113 | + | ... | ... |
app/gui/oven_control/servicedata.h
... | ... | @@ -0,0 +1,201 @@ |
1 | +#ifndef SERVICEDATA_H | |
2 | +#define SERVICEDATA_H | |
3 | + | |
4 | +#include <stdint.h> | |
5 | +#include <time.h> | |
6 | + | |
7 | +#define STRUCT_PACK __attribute__ ((packed)) | |
8 | + | |
9 | +#define MAX_ERROR_TYPE_CNT 31 | |
10 | + | |
11 | +#define MAX_STATICS_CNT 23 | |
12 | + | |
13 | +#define MAX_LOG_SENSOR 16 | |
14 | + | |
15 | +typedef struct _error_item{ | |
16 | + uint16_t fired_cnt; | |
17 | + time_t first_fired; | |
18 | + time_t last_fried; | |
19 | +}STRUCT_PACK error_item; | |
20 | + | |
21 | +typedef union{ | |
22 | + int16_t itemp; | |
23 | + uint16_t utemp; | |
24 | +}type_temp; | |
25 | + | |
26 | +typedef struct _sensor_log_item{ | |
27 | + type_temp high_temp; | |
28 | + time_t last_high_time; | |
29 | +}STRUCT_PACK sensor_log_item; | |
30 | + | |
31 | + | |
32 | +typedef union _sensor_statics_log{ | |
33 | + uint8_t data[MAX_LOG_SENSOR * sizeof(sensor_log_item)]; | |
34 | + sensor_log_item values[MAX_LOG_SENSOR]; | |
35 | + struct{ | |
36 | + sensor_log_item B1; | |
37 | + sensor_log_item B2; | |
38 | + sensor_log_item Reserved1; | |
39 | + sensor_log_item B4; | |
40 | + sensor_log_item B5; | |
41 | + sensor_log_item B3_1; | |
42 | + sensor_log_item B3_2; | |
43 | + sensor_log_item B3_3; | |
44 | + sensor_log_item B3_4; | |
45 | + sensor_log_item Reserved2; //10 | |
46 | + sensor_log_item mbar1; | |
47 | + sensor_log_item mbar2; | |
48 | + sensor_log_item pcb; | |
49 | + sensor_log_item adc; | |
50 | + sensor_log_item convec_fan_rpm; | |
51 | + sensor_log_item bunner_rpm; | |
52 | + }items; | |
53 | +}STRUCT_PACK sensor_statics_log; | |
54 | + | |
55 | + | |
56 | + | |
57 | +typedef union _error_log{ | |
58 | + uint8_t data[MAX_ERROR_TYPE_CNT*sizeof(error_item)]; | |
59 | + error_item values[MAX_ERROR_TYPE_CNT]; | |
60 | + struct{ | |
61 | + error_item door; | |
62 | + error_item upper_fire_fail; | |
63 | + error_item upper_pan_fail; | |
64 | + error_item lower_fire_fail; | |
65 | + error_item lower_pan_fail; | |
66 | + error_item steam_fire_fail; | |
67 | + error_item steam_pan_fail; | |
68 | + error_item water_level_sensor_fail; | |
69 | + error_item water_flow_sensor_fail; | |
70 | + error_item inner_temp_high_alarm; //B1 Sensor | |
71 | + error_item inner_temp_fail; | |
72 | + error_item qunching_temp_high_alarm; //B2 Sensor | |
73 | + error_item qunching_temp_fail; | |
74 | + error_item meatprove_temp1_high_alarm; //B3 Sensor | |
75 | + error_item meatprove_temp1_fail; | |
76 | + error_item wall_temp1_high_alarm; //B4 Sensor | |
77 | + error_item wall_temp1_fail; | |
78 | + error_item steam_gen_temp_high_alram; //B5 Sensor | |
79 | + error_item steam_gen_temp_fail; | |
80 | + error_item meatprove_temp2_fail; | |
81 | + error_item meatprove_temp3_fail; | |
82 | + error_item meatprove_temp4_fail; | |
83 | + error_item pcb_temp_high_alarm; //PCB Temp | |
84 | + error_item pcb_temp_fail; | |
85 | + error_item upper_motor_fail; | |
86 | + error_item lower_motor_fail; | |
87 | + error_item small_motor_fail; | |
88 | + error_item midd_motor_fail; | |
89 | + error_item supply_motor_fail; // Steam Generator Tank Supply Pump | |
90 | + error_item humidity_tamper_fail; | |
91 | + error_item repeat_error; | |
92 | + }items; | |
93 | +}STRUCT_PACK error_log; | |
94 | + | |
95 | +enum ERROR_ITEM_IDX{ | |
96 | + ERROR_IDX_door=0, | |
97 | + ERROR_IDX_upper_fire_fail, | |
98 | + ERROR_IDX_upper_pan_fail, | |
99 | + ERROR_IDX_lower_fire_fail, | |
100 | + ERROR_IDX_lower_pan_fail, | |
101 | + ERROR_IDX_steam_fire_fail, | |
102 | + ERROR_IDX_steam_pan_fail, | |
103 | + ERROR_IDX_water_level_sensor_fail, | |
104 | + ERROR_IDX_water_flow_sensor_fail, | |
105 | + ERROR_IDX_inner_temp_high_alarm, //B1 Sensor | |
106 | + ERROR_IDX_inner_temp_fail, | |
107 | + ERROR_IDX_qunching_temp_high_alarm, //B2 Sensor | |
108 | + ERROR_IDX_qunching_temp_fail, | |
109 | + ERROR_IDX_meatprove_temp1_high_alarm, //B3 Sensor | |
110 | + ERROR_IDX_meatprove_temp1_fail, | |
111 | + ERROR_IDX_wall_temp1_high_alarm, //B4 Sensor | |
112 | + ERROR_IDX_wall_temp1_fail, | |
113 | + ERROR_IDX_steam_gen_temp_high_alram, //B5 Sensor | |
114 | + ERROR_IDX_steam_gen_temp_fail, | |
115 | + ERROR_IDX_meatprove_temp2_fail, | |
116 | + ERROR_IDX_meatprove_temp3_fail, | |
117 | + ERROR_IDX_meatprove_temp4_fail, | |
118 | + ERROR_IDX_pcb_temp_high_alarm, //PCB Temp | |
119 | + ERROR_IDX_pcb_temp_fail, | |
120 | + ERROR_IDX_upper_motor_fail, | |
121 | + ERROR_IDX_lower_motor_fail, | |
122 | + ERROR_IDX_small_motor_fail, | |
123 | + ERROR_IDX_midd_motor_fail, | |
124 | + ERROR_IDX_supply_motor_fail, // Steam Generator Tank Supply Pump | |
125 | + ERROR_IDX_humidity_tamper_fail | |
126 | +}; | |
127 | + | |
128 | +enum USE_ITEMS_IDX{ | |
129 | + USE_ITEM_steam_heat=0, | |
130 | + USE_ITEM_dry_heat, | |
131 | + USE_ITEM_upper_heat, | |
132 | + USE_ITEM_lower_heat, | |
133 | + USE_ITEM_cook_dry_mode, | |
134 | + USE_ITEM_cook_steam_mode, | |
135 | + USE_ITEM_cook_combi_mode, | |
136 | + USE_ITEM_wash_mode_nocleanser, | |
137 | + USE_ITEM_wash_mode_simple, | |
138 | + USE_ITEM_wash_mode_standard, | |
139 | + USE_ITEM_wash_mode_strong, | |
140 | + USE_ITEM_wash_mode_speed, | |
141 | + USE_ITEM_cooldown_mode, | |
142 | + USE_ITEM_door_open, | |
143 | + USE_ITEM_dv_open, | |
144 | + USE_ITEM_ssv_open, | |
145 | + USE_ITEM_qnv_open, | |
146 | + USE_ITEM_ssp_open, | |
147 | + USE_ITEM_snv_open, | |
148 | + USE_ITEM_hosereel, | |
149 | + USE_ITEM_hdm_open, | |
150 | + USE_ITEM_dp_open, | |
151 | + USE_ITEM_unp_open | |
152 | +}; | |
153 | + | |
154 | + | |
155 | + | |
156 | + | |
157 | +typedef union _use_statics_log{ | |
158 | + uint8_t data[MAX_STATICS_CNT*4]; | |
159 | + uint32_t values[MAX_STATICS_CNT]; | |
160 | + struct{ | |
161 | + uint32_t steam_heat; | |
162 | + uint32_t dry_heat; | |
163 | + uint32_t upper_heat; | |
164 | + uint32_t lower_heat; | |
165 | + uint32_t cook_dry_mode; | |
166 | + uint32_t cook_steam_mode; | |
167 | + uint32_t cook_combi_mode; | |
168 | + uint32_t wash_mode_nocleanser; | |
169 | + uint32_t wash_mode_simple; | |
170 | + uint32_t wash_mode_standard; | |
171 | + uint32_t wash_mode_strong; | |
172 | + uint32_t wash_mode_speed; | |
173 | + uint32_t cooldown_mode; | |
174 | + uint32_t door_open; | |
175 | + uint32_t dv_open; | |
176 | + uint32_t ssv_open; | |
177 | + uint32_t qnv_open; | |
178 | + uint32_t ssp_open; | |
179 | + uint32_t snv_open; | |
180 | + uint32_t hosereel; | |
181 | + uint32_t hdm_open; | |
182 | + uint32_t dp_open; | |
183 | + uint32_t unp_open; | |
184 | + }items; | |
185 | +}STRUCT_PACK use_statics_log; | |
186 | + | |
187 | +class ServiceData | |
188 | +{ | |
189 | +public: | |
190 | + ServiceData(); | |
191 | + | |
192 | + | |
193 | + error_log err_log; | |
194 | + use_statics_log use_log; | |
195 | + sensor_statics_log sensor_log; | |
196 | + uint16_t m_nRepeatErrorIdx; | |
197 | + bool saveServiceData(void); | |
198 | + bool loadServiceData(void); | |
199 | +}; | |
200 | + | |
201 | +#endif // SERVICEDATA_H | ... | ... |
app/gui/oven_control/servicedatas.cpp
... | ... | @@ -1,113 +0,0 @@ |
1 | -#include "string.h" | |
2 | -#include "servicedatas.h" | |
3 | -#include <QDebug> | |
4 | -#include <fcntl.h> | |
5 | -#include <unistd.h> // write(), close() | |
6 | - | |
7 | -#define FRAM_SIZE 2048 | |
8 | -#define FRAM_TEST_PROCESS 0 | |
9 | - | |
10 | -#define fRam_path "/sys/bus/spi/devices/spi0.0/fram" | |
11 | -#define INIT_FRAM 1 | |
12 | - | |
13 | - | |
14 | -servicedatas::servicedatas() | |
15 | -{ | |
16 | - qDebug()<< "Statics Data Size Report\r\n error_log size = " << sizeof(error_log) << " \r\nuse_static_log size = " << sizeof(use_statics_log) \ | |
17 | - << "\r\nsensor_statics_log size = " << sizeof(sensor_statics_log); | |
18 | - memset((void*)err_log.datas,0x00,sizeof(error_log)); | |
19 | - memset((void*)use_log.datas,0x00,sizeof(use_statics_log)); | |
20 | - memset((void*)sensor_log.datas,0x00, sizeof(sensor_statics_log)); | |
21 | -#if INIT_FRAM == 1 | |
22 | - saveServiceDatas(); | |
23 | -#else | |
24 | - loadServiceDatas(); | |
25 | -#endif | |
26 | -} | |
27 | - | |
28 | - | |
29 | - | |
30 | -bool servicedatas::loadServiceDatas(void){ | |
31 | - uint8_t buffs[FRAM_SIZE]; | |
32 | - int fd; | |
33 | - | |
34 | -#if FRAM_TEST_PROCESS == 1 | |
35 | - int i; | |
36 | - memset(buffs,0x00,256); | |
37 | - for(i=0;i<256;i++){ | |
38 | - buffs[i] = i; | |
39 | - } | |
40 | - fd = open(fRam_path, O_RDWR); | |
41 | - if(fd>0){ | |
42 | - write(fd,buffs,256); | |
43 | - close(fd); | |
44 | - } | |
45 | - else{ | |
46 | - qDebug()<<"FRAM open fail!"; | |
47 | - return false; | |
48 | - } | |
49 | - i=0; | |
50 | - memset(buffs,0x00,256); | |
51 | - fd = open(fRam_path, O_RDONLY ); | |
52 | - if(fd>0){ | |
53 | - read(fd,buffs,256); | |
54 | - close(fd); | |
55 | - }else{ | |
56 | - qDebug()<<"FRAM open fail!"; | |
57 | - return false; | |
58 | - } | |
59 | - for(i=0;i<256;i++){ | |
60 | - if(i !=buffs[i]) { | |
61 | - qDebug()<<"FRAM Test Fail"; | |
62 | - return false; | |
63 | - } | |
64 | - } | |
65 | - qDebug()<<"FRAM Test Success!"; | |
66 | - return true; | |
67 | -#endif | |
68 | - | |
69 | - | |
70 | - | |
71 | - | |
72 | - | |
73 | - | |
74 | - fd = open(fRam_path, O_RDONLY ); | |
75 | - if(fd>0){ | |
76 | - memset(buffs,0x00,FRAM_SIZE); | |
77 | - read(fd,buffs,FRAM_SIZE); | |
78 | - if(buffs[sizeof(error_log) + sizeof(use_statics_log) + sizeof(sensor_statics_log)] != 0x9C){ | |
79 | - close(fd); | |
80 | - return saveServiceDatas(); | |
81 | - } | |
82 | - | |
83 | - qDebug() << "FRAM Read, Write Size is " << sizeof(error_log)+sizeof(use_statics_log); | |
84 | - memcpy((void*)err_log.datas,buffs,sizeof(error_log)); | |
85 | - memcpy((void*)use_log.datas, (void*)(&buffs[sizeof(error_log)]),sizeof(use_statics_log)); | |
86 | - memcpy((void*)sensor_log.datas,(void*)(&buffs[sizeof(error_log) + sizeof(use_statics_log)]),sizeof(sensor_statics_log)); | |
87 | - close(fd); | |
88 | - }else{ | |
89 | - qDebug()<<"FRAM FILE Open fail!!"; | |
90 | - } | |
91 | - return true; | |
92 | -} | |
93 | - | |
94 | -bool servicedatas::saveServiceDatas(void){ | |
95 | - uint8_t buffs[FRAM_SIZE]; | |
96 | - int fd; | |
97 | - fd = open(fRam_path, O_RDWR | O_SYNC); | |
98 | - if(fd>0){ | |
99 | - memset(buffs,0x00,FRAM_SIZE); | |
100 | - memcpy(buffs,(void*)err_log.datas,sizeof(error_log)); | |
101 | - memcpy((void*)(&buffs[sizeof(error_log)]),(void*)use_log.datas,sizeof(use_statics_log)); | |
102 | - memcpy((void*)(&buffs[sizeof(error_log) + sizeof(use_statics_log)]),(void*)sensor_log.datas,sizeof(sensor_statics_log)); | |
103 | - buffs[sizeof(error_log) + sizeof(use_statics_log) + sizeof(sensor_statics_log)] = 0x9C; | |
104 | - write(fd,buffs,FRAM_SIZE); | |
105 | - close(fd); | |
106 | - }else{ | |
107 | - qDebug()<<"FRAM FILE Open fail!!"; | |
108 | - return false; | |
109 | - } | |
110 | - return true; | |
111 | -} | |
112 | - | |
113 | - |
app/gui/oven_control/servicedatas.h
... | ... | @@ -1,201 +0,0 @@ |
1 | -#ifndef SERVICEDATAS_H | |
2 | -#define SERVICEDATAS_H | |
3 | - | |
4 | -#include <stdint.h> | |
5 | -#include <time.h> | |
6 | - | |
7 | -#define STRUCT_PACK __attribute__ ((packed)) | |
8 | - | |
9 | -#define MAX_ERROR_TYPE_CNT 31 | |
10 | - | |
11 | -#define MAX_STATICS_CNT 23 | |
12 | - | |
13 | -#define MAX_LOG_SENSOR 16 | |
14 | - | |
15 | -typedef struct _error_item{ | |
16 | - uint16_t fired_cnt; | |
17 | - time_t first_fired; | |
18 | - time_t last_fried; | |
19 | -}STRUCT_PACK error_item; | |
20 | - | |
21 | -typedef union{ | |
22 | - int16_t itemp; | |
23 | - uint16_t utemp; | |
24 | -}type_temp; | |
25 | - | |
26 | -typedef struct _sensor_log_item{ | |
27 | - type_temp high_temp; | |
28 | - time_t last_high_time; | |
29 | -}STRUCT_PACK sensor_log_item; | |
30 | - | |
31 | - | |
32 | -typedef union _sensor_statics_log{ | |
33 | - uint8_t datas[MAX_LOG_SENSOR * sizeof(sensor_log_item)]; | |
34 | - sensor_log_item values[MAX_LOG_SENSOR]; | |
35 | - struct{ | |
36 | - sensor_log_item B1; | |
37 | - sensor_log_item B2; | |
38 | - sensor_log_item Reserved1; | |
39 | - sensor_log_item B4; | |
40 | - sensor_log_item B5; | |
41 | - sensor_log_item B3_1; | |
42 | - sensor_log_item B3_2; | |
43 | - sensor_log_item B3_3; | |
44 | - sensor_log_item B3_4; | |
45 | - sensor_log_item Reserved2; //10 | |
46 | - sensor_log_item mbar1; | |
47 | - sensor_log_item mbar2; | |
48 | - sensor_log_item pcb; | |
49 | - sensor_log_item adc; | |
50 | - sensor_log_item convec_fan_rpm; | |
51 | - sensor_log_item bunner_rpm; | |
52 | - }items; | |
53 | -}STRUCT_PACK sensor_statics_log; | |
54 | - | |
55 | - | |
56 | - | |
57 | -typedef union _error_log{ | |
58 | - uint8_t datas[MAX_ERROR_TYPE_CNT*sizeof(error_item)]; | |
59 | - error_item values[MAX_ERROR_TYPE_CNT]; | |
60 | - struct{ | |
61 | - error_item door; | |
62 | - error_item upper_fire_fail; | |
63 | - error_item upper_pan_fail; | |
64 | - error_item lower_fire_fail; | |
65 | - error_item lower_pan_fail; | |
66 | - error_item steam_fire_fail; | |
67 | - error_item steam_pan_fail; | |
68 | - error_item water_level_sensor_fail; | |
69 | - error_item water_flow_sensor_fail; | |
70 | - error_item inner_temp_high_alarm; //B1 Sensor | |
71 | - error_item inner_temp_fail; | |
72 | - error_item qunching_temp_high_alarm; //B2 Sensor | |
73 | - error_item qunching_temp_fail; | |
74 | - error_item meatprove_temp1_high_alarm; //B3 Sensor | |
75 | - error_item meatprove_temp1_fail; | |
76 | - error_item wall_temp1_high_alarm; //B4 Sensor | |
77 | - error_item wall_temp1_fail; | |
78 | - error_item steam_gen_temp_high_alram; //B5 Sensor | |
79 | - error_item steam_gen_temp_fail; | |
80 | - error_item meatprove_temp2_fail; | |
81 | - error_item meatprove_temp3_fail; | |
82 | - error_item meatprove_temp4_fail; | |
83 | - error_item pcb_temp_high_alarm; //PCB Temp | |
84 | - error_item pcb_temp_fail; | |
85 | - error_item upper_motor_fail; | |
86 | - error_item lower_motor_fail; | |
87 | - error_item small_motor_fail; | |
88 | - error_item midd_motor_fail; | |
89 | - error_item supply_motor_fail; // Steam Generator Tank Supply Pump | |
90 | - error_item humidity_tamper_fail; | |
91 | - error_item repeat_error; | |
92 | - }items; | |
93 | -}STRUCT_PACK error_log; | |
94 | - | |
95 | -enum ERROR_ITEM_IDX{ | |
96 | - ERROR_IDX_door=0, | |
97 | - ERROR_IDX_upper_fire_fail, | |
98 | - ERROR_IDX_upper_pan_fail, | |
99 | - ERROR_IDX_lower_fire_fail, | |
100 | - ERROR_IDX_lower_pan_fail, | |
101 | - ERROR_IDX_steam_fire_fail, | |
102 | - ERROR_IDX_steam_pan_fail, | |
103 | - ERROR_IDX_water_level_sensor_fail, | |
104 | - ERROR_IDX_water_flow_sensor_fail, | |
105 | - ERROR_IDX_inner_temp_high_alarm, //B1 Sensor | |
106 | - ERROR_IDX_inner_temp_fail, | |
107 | - ERROR_IDX_qunching_temp_high_alarm, //B2 Sensor | |
108 | - ERROR_IDX_qunching_temp_fail, | |
109 | - ERROR_IDX_meatprove_temp1_high_alarm, //B3 Sensor | |
110 | - ERROR_IDX_meatprove_temp1_fail, | |
111 | - ERROR_IDX_wall_temp1_high_alarm, //B4 Sensor | |
112 | - ERROR_IDX_wall_temp1_fail, | |
113 | - ERROR_IDX_steam_gen_temp_high_alram, //B5 Sensor | |
114 | - ERROR_IDX_steam_gen_temp_fail, | |
115 | - ERROR_IDX_meatprove_temp2_fail, | |
116 | - ERROR_IDX_meatprove_temp3_fail, | |
117 | - ERROR_IDX_meatprove_temp4_fail, | |
118 | - ERROR_IDX_pcb_temp_high_alarm, //PCB Temp | |
119 | - ERROR_IDX_pcb_temp_fail, | |
120 | - ERROR_IDX_upper_motor_fail, | |
121 | - ERROR_IDX_lower_motor_fail, | |
122 | - ERROR_IDX_small_motor_fail, | |
123 | - ERROR_IDX_midd_motor_fail, | |
124 | - ERROR_IDX_supply_motor_fail, // Steam Generator Tank Supply Pump | |
125 | - ERROR_IDX_humidity_tamper_fail | |
126 | -}; | |
127 | - | |
128 | -enum USE_ITEMS_IDX{ | |
129 | - USE_ITEM_steam_heat=0, | |
130 | - USE_ITEM_dry_heat, | |
131 | - USE_ITEM_upper_heat, | |
132 | - USE_ITEM_lower_heat, | |
133 | - USE_ITEM_cook_dry_mode, | |
134 | - USE_ITEM_cook_steam_mode, | |
135 | - USE_ITEM_cook_combi_mode, | |
136 | - USE_ITEM_wash_mode_nocleanser, | |
137 | - USE_ITEM_wash_mode_simple, | |
138 | - USE_ITEM_wash_mode_standard, | |
139 | - USE_ITEM_wash_mode_strong, | |
140 | - USE_ITEM_wash_mode_speed, | |
141 | - USE_ITEM_cooldown_mode, | |
142 | - USE_ITEM_door_open, | |
143 | - USE_ITEM_dv_open, | |
144 | - USE_ITEM_ssv_open, | |
145 | - USE_ITEM_qnv_open, | |
146 | - USE_ITEM_ssp_open, | |
147 | - USE_ITEM_snv_open, | |
148 | - USE_ITEM_hosereel, | |
149 | - USE_ITEM_hdm_open, | |
150 | - USE_ITEM_dp_open, | |
151 | - USE_ITEM_unp_open | |
152 | -}; | |
153 | - | |
154 | - | |
155 | - | |
156 | - | |
157 | -typedef union _use_statics_log{ | |
158 | - uint8_t datas[MAX_STATICS_CNT*4]; | |
159 | - uint32_t values[MAX_STATICS_CNT]; | |
160 | - struct{ | |
161 | - uint32_t steam_heat; | |
162 | - uint32_t dry_heat; | |
163 | - uint32_t upper_heat; | |
164 | - uint32_t lower_heat; | |
165 | - uint32_t cook_dry_mode; | |
166 | - uint32_t cook_steam_mode; | |
167 | - uint32_t cook_combi_mode; | |
168 | - uint32_t wash_mode_nocleanser; | |
169 | - uint32_t wash_mode_simple; | |
170 | - uint32_t wash_mode_standard; | |
171 | - uint32_t wash_mode_strong; | |
172 | - uint32_t wash_mode_speed; | |
173 | - uint32_t cooldown_mode; | |
174 | - uint32_t door_open; | |
175 | - uint32_t dv_open; | |
176 | - uint32_t ssv_open; | |
177 | - uint32_t qnv_open; | |
178 | - uint32_t ssp_open; | |
179 | - uint32_t snv_open; | |
180 | - uint32_t hosereel; | |
181 | - uint32_t hdm_open; | |
182 | - uint32_t dp_open; | |
183 | - uint32_t unp_open; | |
184 | - }items; | |
185 | -}STRUCT_PACK use_statics_log; | |
186 | - | |
187 | -class servicedatas | |
188 | -{ | |
189 | -public: | |
190 | - servicedatas(); | |
191 | - | |
192 | - | |
193 | - error_log err_log; | |
194 | - use_statics_log use_log; | |
195 | - sensor_statics_log sensor_log; | |
196 | - uint16_t m_nRepeatErrorIdx; | |
197 | - bool saveServiceDatas(void); | |
198 | - bool loadServiceDatas(void); | |
199 | -}; | |
200 | - | |
201 | -#endif // SERVICEDATAS_H |
app/gui/oven_control/servicehistorymain.cpp
... | ... | @@ -2,46 +2,46 @@ |
2 | 2 | #include "ui_servicehistorymain.h" |
3 | 3 | #include "historylistwindow.h" |
4 | 4 | |
5 | -serviceHistoryMain::serviceHistoryMain(QWidget *parent) : | |
5 | +ServiceHistoryMain::ServiceHistoryMain(QWidget *parent) : | |
6 | 6 | QMainWindow(parent), |
7 | - ui(new Ui::serviceHistoryMain) | |
7 | + ui(new Ui::ServiceHistoryMain) | |
8 | 8 | { |
9 | 9 | ui->setupUi(this); |
10 | 10 | connect(ui->backButton, SIGNAL(released()), this, SLOT(deleteLater())); |
11 | 11 | } |
12 | 12 | |
13 | -serviceHistoryMain::~serviceHistoryMain() | |
13 | +ServiceHistoryMain::~ServiceHistoryMain() | |
14 | 14 | { |
15 | 15 | delete ui; |
16 | 16 | } |
17 | 17 | |
18 | -void serviceHistoryMain::on_btnUpperBunner_clicked() | |
18 | +void ServiceHistoryMain::on_btnUpperBunner_clicked() | |
19 | 19 | { |
20 | - historyListWindow *w = new historyListWindow(this); | |
20 | + HistoryListWindow *w = new HistoryListWindow(this); | |
21 | 21 | w->setWindosDataSet(ERROR_HISTORY_UPPERBUNNER); |
22 | 22 | w->setWindowModality(Qt::WindowModal); |
23 | 23 | w->showFullScreen(); |
24 | 24 | } |
25 | 25 | |
26 | -void serviceHistoryMain::on_btnSteamBunner_clicked() | |
26 | +void ServiceHistoryMain::on_btnSteamBunner_clicked() | |
27 | 27 | { |
28 | - historyListWindow *w = new historyListWindow(this); | |
28 | + HistoryListWindow *w = new HistoryListWindow(this); | |
29 | 29 | w->setWindosDataSet(ERROR_HISTORY_STEAMBUNNER); |
30 | 30 | w->setWindowModality(Qt::WindowModal); |
31 | 31 | w->showFullScreen(); |
32 | 32 | } |
33 | 33 | |
34 | -void serviceHistoryMain::on_btnLowerBunner_clicked() | |
34 | +void ServiceHistoryMain::on_btnLowerBunner_clicked() | |
35 | 35 | { |
36 | - historyListWindow *w = new historyListWindow(this); | |
36 | + HistoryListWindow *w = new HistoryListWindow(this); | |
37 | 37 | w->setWindosDataSet(ERROR_HISTORY_LOWERBUNNER); |
38 | 38 | w->setWindowModality(Qt::WindowModal); |
39 | 39 | w->showFullScreen(); |
40 | 40 | } |
41 | 41 | |
42 | -void serviceHistoryMain::on_btnErrorTotal_clicked() | |
42 | +void ServiceHistoryMain::on_btnErrorTotal_clicked() | |
43 | 43 | { |
44 | - historyListWindow *w = new historyListWindow(this); | |
44 | + HistoryListWindow *w = new HistoryListWindow(this); | |
45 | 45 | w->setWindosDataSet(ERROR_HISTORY_TOTAL); |
46 | 46 | w->setWindowModality(Qt::WindowModal); |
47 | 47 | w->showFullScreen(); | ... | ... |
app/gui/oven_control/servicehistorymain.h
... | ... | @@ -4,16 +4,16 @@ |
4 | 4 | #include <QMainWindow> |
5 | 5 | |
6 | 6 | namespace Ui { |
7 | -class serviceHistoryMain; | |
7 | +class ServiceHistoryMain; | |
8 | 8 | } |
9 | 9 | |
10 | -class serviceHistoryMain : public QMainWindow | |
10 | +class ServiceHistoryMain : public QMainWindow | |
11 | 11 | { |
12 | 12 | Q_OBJECT |
13 | 13 | |
14 | 14 | public: |
15 | - explicit serviceHistoryMain(QWidget *parent = 0); | |
16 | - ~serviceHistoryMain(); | |
15 | + explicit ServiceHistoryMain(QWidget *parent = 0); | |
16 | + ~ServiceHistoryMain(); | |
17 | 17 | |
18 | 18 | private slots: |
19 | 19 | void on_btnUpperBunner_clicked(); |
... | ... | @@ -25,7 +25,7 @@ private slots: |
25 | 25 | void on_btnErrorTotal_clicked(); |
26 | 26 | |
27 | 27 | private: |
28 | - Ui::serviceHistoryMain *ui; | |
28 | + Ui::ServiceHistoryMain *ui; | |
29 | 29 | }; |
30 | 30 | |
31 | 31 | #endif // SERVICEHISTORYMAIN_H | ... | ... |
app/gui/oven_control/servicehistorymain.ui
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <ui version="4.0"> |
3 | - <class>serviceHistoryMain</class> | |
4 | - <widget class="QMainWindow" name="serviceHistoryMain"> | |
3 | + <class>ServiceHistoryMain</class> | |
4 | + <widget class="QMainWindow" name="ServiceHistoryMain"> | |
5 | 5 | <property name="geometry"> |
6 | 6 | <rect> |
7 | 7 | <x>0</x> | ... | ... |