Commit c50beef02d5f1d7f7d6ae252284c6bc1eefe8cc6
1 parent
cf0ca80f62
Exists in
master
and in
2 other branches
에러 처리 루틴 및 에러 처리 팝업 추가
부품 사용 통계 기능 추가
Showing
13 changed files
with
808 additions
and
100 deletions
 
Show diff stats
app/gui/oven_control/engineermenuwindow.cpp
| @@ -6,6 +6,11 @@ engineermenuwindow::engineermenuwindow(QWidget *parent) : | @@ -6,6 +6,11 @@ engineermenuwindow::engineermenuwindow(QWidget *parent) : | ||
| 6 | ui(new Ui::engineermenuwindow) | 6 | ui(new Ui::engineermenuwindow) | 
| 7 | { | 7 | { | 
| 8 | ui->setupUi(this); | 8 | ui->setupUi(this); | 
| 9 | + | ||
| 10 | + //ui->clockContainer->setParent(ui->upperStack); | ||
| 11 | + //setAttribute(Qt::WA_DeleteOnClose); | ||
| 12 | + | ||
| 13 | + connect(ui->backButton, SIGNAL(released()), this, SLOT(deleteLater())); | ||
| 9 | } | 14 | } | 
| 10 | 15 | ||
| 11 | engineermenuwindow::~engineermenuwindow() | 16 | engineermenuwindow::~engineermenuwindow() | 
app/gui/oven_control/engineermenuwindow.ui
| @@ -18,6 +18,9 @@ | @@ -18,6 +18,9 @@ | ||
| 18 | #bottomBar { background-image: url(:/images/bottom_bar/background.png); }</string> | 18 | #bottomBar { background-image: url(:/images/bottom_bar/background.png); }</string> | 
| 19 | </property> | 19 | </property> | 
| 20 | <widget class="QWidget" name="centralwidget"> | 20 | <widget class="QWidget" name="centralwidget"> | 
| 21 | + <property name="styleSheet"> | ||
| 22 | + <string notr="true"/> | ||
| 23 | + </property> | ||
| 21 | <widget class="QStackedWidget" name="upperStack"> | 24 | <widget class="QStackedWidget" name="upperStack"> | 
| 22 | <property name="geometry"> | 25 | <property name="geometry"> | 
| 23 | <rect> | 26 | <rect> | 
| @@ -228,9 +231,12 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</str | @@ -228,9 +231,12 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</str | ||
| 228 | </font> | 231 | </font> | 
| 229 | </property> | 232 | </property> | 
| 230 | <property name="styleSheet"> | 233 | <property name="styleSheet"> | 
| 231 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 232 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | ||
| 233 | -QPushButton { text-align: left;}</string> | 234 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 235 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } | ||
| 236 | +QPushButton { text-align: left;} | ||
| 237 | + | ||
| 238 | + | ||
| 239 | +</string> | ||
| 234 | </property> | 240 | </property> | 
| 235 | <property name="text"> | 241 | <property name="text"> | 
| 236 | <string> 교정</string> | 242 | <string> 교정</string> | 
| @@ -395,8 +401,8 @@ QPushButton { text-align: left;}</string> | @@ -395,8 +401,8 @@ QPushButton { text-align: left;}</string> | ||
| 395 | </font> | 401 | </font> | 
| 396 | </property> | 402 | </property> | 
| 397 | <property name="styleSheet"> | 403 | <property name="styleSheet"> | 
| 398 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 399 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | 404 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 405 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } | ||
| 400 | QPushButton { text-align: left;}</string> | 406 | QPushButton { text-align: left;}</string> | 
| 401 | </property> | 407 | </property> | 
| 402 | <property name="text"> | 408 | <property name="text"> | 
| @@ -562,8 +568,8 @@ QPushButton { text-align: left;}</string> | @@ -562,8 +568,8 @@ QPushButton { text-align: left;}</string> | ||
| 562 | </font> | 568 | </font> | 
| 563 | </property> | 569 | </property> | 
| 564 | <property name="styleSheet"> | 570 | <property name="styleSheet"> | 
| 565 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 566 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | 571 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 572 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } | ||
| 567 | QPushButton { text-align: left;}</string> | 573 | QPushButton { text-align: left;}</string> | 
| 568 | </property> | 574 | </property> | 
| 569 | <property name="text"> | 575 | <property name="text"> | 
| @@ -729,8 +735,8 @@ QPushButton { text-align: left;}</string> | @@ -729,8 +735,8 @@ QPushButton { text-align: left;}</string> | ||
| 729 | </font> | 735 | </font> | 
| 730 | </property> | 736 | </property> | 
| 731 | <property name="styleSheet"> | 737 | <property name="styleSheet"> | 
| 732 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 733 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | 738 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 739 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } | ||
| 734 | QPushButton { text-align: left;}</string> | 740 | QPushButton { text-align: left;}</string> | 
| 735 | </property> | 741 | </property> | 
| 736 | <property name="text"> | 742 | <property name="text"> | 
| @@ -896,9 +902,8 @@ QPushButton { text-align: left;}</string> | @@ -896,9 +902,8 @@ QPushButton { text-align: left;}</string> | ||
| 896 | </font> | 902 | </font> | 
| 897 | </property> | 903 | </property> | 
| 898 | <property name="styleSheet"> | 904 | <property name="styleSheet"> | 
| 899 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 900 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | ||
| 901 | -QPushButton { text-align: left;}</string> | 905 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 906 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }QPushButton { text-align: left;}</string> | ||
| 902 | </property> | 907 | </property> | 
| 903 | <property name="text"> | 908 | <property name="text"> | 
| 904 | <string> 실시간데이터</string> | 909 | <string> 실시간데이터</string> | 
| @@ -1063,9 +1068,8 @@ QPushButton { text-align: left;}</string> | @@ -1063,9 +1068,8 @@ QPushButton { text-align: left;}</string> | ||
| 1063 | </font> | 1068 | </font> | 
| 1064 | </property> | 1069 | </property> | 
| 1065 | <property name="styleSheet"> | 1070 | <property name="styleSheet"> | 
| 1066 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 1067 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | ||
| 1068 | -QPushButton { text-align: left;}</string> | 1071 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 1072 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); }QPushButton { text-align: left;}</string> | ||
| 1069 | </property> | 1073 | </property> | 
| 1070 | <property name="text"> | 1074 | <property name="text"> | 
| 1071 | <string> 작동시간</string> | 1075 | <string> 작동시간</string> | 
| @@ -1230,8 +1234,8 @@ QPushButton { text-align: left;}</string> | @@ -1230,8 +1234,8 @@ QPushButton { text-align: left;}</string> | ||
| 1230 | </font> | 1234 | </font> | 
| 1231 | </property> | 1235 | </property> | 
| 1232 | <property name="styleSheet"> | 1236 | <property name="styleSheet"> | 
| 1233 | - <string notr="true">QPushButton { border-image: url(:/images/config/service/100_fav_pannel.png); } | ||
| 1234 | -QPushButton:pressed { border-image: url(:/images/config/service/100_fav_pannel_ov.png); } | 1237 | + <string notr="true">QPushButton { border-image: url(:/images/config/pannel.png); } | 
| 1238 | +QPushButton:pressed { border-image: url(:/images/config/pannel_ov.png); } | ||
| 1235 | QPushButton { text-align: left;}</string> | 1239 | QPushButton { text-align: left;}</string> | 
| 1236 | </property> | 1240 | </property> | 
| 1237 | <property name="text"> | 1241 | <property name="text"> | 
app/gui/oven_control/errorpopupdlg.cpp
| @@ -0,0 +1,24 @@ | @@ -0,0 +1,24 @@ | ||
| 1 | +#include "errorpopupdlg.h" | ||
| 2 | +#include "ui_errorpopupdlg.h" | ||
| 3 | + | ||
| 4 | +errorPopupDlg::errorPopupDlg(QWidget *parent, const QString &MsgDesc) : | ||
| 5 | + QDialog(parent), | ||
| 6 | + ui(new Ui::errorPopupDlg) | ||
| 7 | +{ | ||
| 8 | + ui->setupUi(this); | ||
| 9 | + this->setAttribute(Qt::WA_TranslucentBackground); | ||
| 10 | + this->setWindowFlags(Qt::FramelessWindowHint); | ||
| 11 | + | ||
| 12 | + ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); | ||
| 13 | + ui->ctrlWarnDescription->setText(MsgDesc); | ||
| 14 | +} | ||
| 15 | + | ||
| 16 | +errorPopupDlg::~errorPopupDlg() | ||
| 17 | +{ | ||
| 18 | + delete ui; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +void errorPopupDlg::on_ctrlOkBtn_released() | ||
| 22 | +{ | ||
| 23 | + deleteLater(); | ||
| 24 | +} | 
app/gui/oven_control/errorpopupdlg.h
| @@ -0,0 +1,25 @@ | @@ -0,0 +1,25 @@ | ||
| 1 | +#ifndef ERRORPOPUPDLG_H | ||
| 2 | +#define ERRORPOPUPDLG_H | ||
| 3 | + | ||
| 4 | +#include <QDialog> | ||
| 5 | + | ||
| 6 | +namespace Ui { | ||
| 7 | +class errorPopupDlg; | ||
| 8 | +} | ||
| 9 | + | ||
| 10 | +class errorPopupDlg : public QDialog | ||
| 11 | +{ | ||
| 12 | + Q_OBJECT | ||
| 13 | + | ||
| 14 | +public: | ||
| 15 | + explicit errorPopupDlg(QWidget *parent = 0, const QString &MsgDesc=0); | ||
| 16 | + ~errorPopupDlg(); | ||
| 17 | + | ||
| 18 | +private slots: | ||
| 19 | + void on_ctrlOkBtn_released(); | ||
| 20 | + | ||
| 21 | +private: | ||
| 22 | + Ui::errorPopupDlg *ui; | ||
| 23 | +}; | ||
| 24 | + | ||
| 25 | +#endif // ERRORPOPUPDLG_H | 
app/gui/oven_control/errorpopupdlg.ui
| @@ -0,0 +1,139 @@ | @@ -0,0 +1,139 @@ | ||
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | +<ui version="4.0"> | ||
| 3 | + <class>errorPopupDlg</class> | ||
| 4 | + <widget class="QDialog" name="errorPopupDlg"> | ||
| 5 | + <property name="geometry"> | ||
| 6 | + <rect> | ||
| 7 | + <x>0</x> | ||
| 8 | + <y>0</y> | ||
| 9 | + <width>900</width> | ||
| 10 | + <height>1600</height> | ||
| 11 | + </rect> | ||
| 12 | + </property> | ||
| 13 | + <property name="windowTitle"> | ||
| 14 | + <string>Dialog</string> | ||
| 15 | + </property> | ||
| 16 | + <property name="styleSheet"> | ||
| 17 | + <string notr="true">#centralwidget { background-image: url(:/images/background/popup/503.png); | ||
| 18 | +border-color: rgb(255,255,255); | ||
| 19 | +border-width: 2px; | ||
| 20 | +border-style: solid;}</string> | ||
| 21 | + </property> | ||
| 22 | + <widget class="QWidget" name="centralwidget" native="true"> | ||
| 23 | + <property name="geometry"> | ||
| 24 | + <rect> | ||
| 25 | + <x>0</x> | ||
| 26 | + <y>510</y> | ||
| 27 | + <width>900</width> | ||
| 28 | + <height>503</height> | ||
| 29 | + </rect> | ||
| 30 | + </property> | ||
| 31 | + <property name="styleSheet"> | ||
| 32 | + <string notr="true"/> | ||
| 33 | + </property> | ||
| 34 | + <widget class="QPushButton" name="ctrlOkBtn"> | ||
| 35 | + <property name="geometry"> | ||
| 36 | + <rect> | ||
| 37 | + <x>374</x> | ||
| 38 | + <y>370</y> | ||
| 39 | + <width>152</width> | ||
| 40 | + <height>70</height> | ||
| 41 | + </rect> | ||
| 42 | + </property> | ||
| 43 | + <property name="sizePolicy"> | ||
| 44 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
| 45 | + <horstretch>0</horstretch> | ||
| 46 | + <verstretch>0</verstretch> | ||
| 47 | + </sizepolicy> | ||
| 48 | + </property> | ||
| 49 | + <property name="font"> | ||
| 50 | + <font> | ||
| 51 | + <pointsize>10</pointsize> | ||
| 52 | + <weight>75</weight> | ||
| 53 | + <bold>true</bold> | ||
| 54 | + </font> | ||
| 55 | + </property> | ||
| 56 | + <property name="styleSheet"> | ||
| 57 | + <string notr="true">QPushButton {border-image: url(:/images/button/152.png);} | ||
| 58 | +QPushButton::pressed {border-image: url(:/images/button/152_ov.png);} | ||
| 59 | +QPushButton { text-align:center;}</string> | ||
| 60 | + </property> | ||
| 61 | + <property name="text"> | ||
| 62 | + <string>확 인</string> | ||
| 63 | + </property> | ||
| 64 | + </widget> | ||
| 65 | + <widget class="QLabel" name="ctrlWarnDescription"> | ||
| 66 | + <property name="geometry"> | ||
| 67 | + <rect> | ||
| 68 | + <x>0</x> | ||
| 69 | + <y>120</y> | ||
| 70 | + <width>901</width> | ||
| 71 | + <height>201</height> | ||
| 72 | + </rect> | ||
| 73 | + </property> | ||
| 74 | + <property name="font"> | ||
| 75 | + <font> | ||
| 76 | + <pointsize>12</pointsize> | ||
| 77 | + <weight>75</weight> | ||
| 78 | + <bold>true</bold> | ||
| 79 | + </font> | ||
| 80 | + </property> | ||
| 81 | + <property name="styleSheet"> | ||
| 82 | + <string notr="true">color: rgb(255, 255, 255);</string> | ||
| 83 | + </property> | ||
| 84 | + <property name="text"> | ||
| 85 | + <string>TextLabel</string> | ||
| 86 | + </property> | ||
| 87 | + <property name="alignment"> | ||
| 88 | + <set>Qt::AlignCenter</set> | ||
| 89 | + </property> | ||
| 90 | + </widget> | ||
| 91 | + <widget class="QLabel" name="label"> | ||
| 92 | + <property name="geometry"> | ||
| 93 | + <rect> | ||
| 94 | + <x>40</x> | ||
| 95 | + <y>5</y> | ||
| 96 | + <width>861</width> | ||
| 97 | + <height>51</height> | ||
| 98 | + </rect> | ||
| 99 | + </property> | ||
| 100 | + <property name="font"> | ||
| 101 | + <font> | ||
| 102 | + <pointsize>16</pointsize> | ||
| 103 | + <weight>75</weight> | ||
| 104 | + <bold>true</bold> | ||
| 105 | + </font> | ||
| 106 | + </property> | ||
| 107 | + <property name="styleSheet"> | ||
| 108 | + <string notr="true">color: rgb(255, 255, 255);</string> | ||
| 109 | + </property> | ||
| 110 | + <property name="text"> | ||
| 111 | + <string>경 고</string> | ||
| 112 | + </property> | ||
| 113 | + <property name="alignment"> | ||
| 114 | + <set>Qt::AlignCenter</set> | ||
| 115 | + </property> | ||
| 116 | + </widget> | ||
| 117 | + <widget class="QLabel" name="label_3"> | ||
| 118 | + <property name="geometry"> | ||
| 119 | + <rect> | ||
| 120 | + <x>350</x> | ||
| 121 | + <y>6</y> | ||
| 122 | + <width>61</width> | ||
| 123 | + <height>51</height> | ||
| 124 | + </rect> | ||
| 125 | + </property> | ||
| 126 | + <property name="text"> | ||
| 127 | + <string/> | ||
| 128 | + </property> | ||
| 129 | + <property name="pixmap"> | ||
| 130 | + <pixmap resource="resources.qrc">:/images/symbol/warning.png</pixmap> | ||
| 131 | + </property> | ||
| 132 | + </widget> | ||
| 133 | + </widget> | ||
| 134 | + </widget> | ||
| 135 | + <resources> | ||
| 136 | + <include location="resources.qrc"/> | ||
| 137 | + </resources> | ||
| 138 | + <connections/> | ||
| 139 | +</ui> | 
app/gui/oven_control/oven_control.pro
| @@ -50,7 +50,8 @@ SOURCES += main.cpp\ | @@ -50,7 +50,8 @@ SOURCES += main.cpp\ | ||
| 50 | cookbook.cpp \ | 50 | cookbook.cpp \ | 
| 51 | define.cpp \ | 51 | define.cpp \ | 
| 52 | autocook.cpp \ | 52 | autocook.cpp \ | 
| 53 | - keepwarmpopup.cpp | 53 | + keepwarmpopup.cpp \ | 
| 54 | + errorpopupdlg.cpp | ||
| 54 | 55 | ||
| 55 | HEADERS += mainwindow.h \ | 56 | HEADERS += mainwindow.h \ | 
| 56 | cook.h \ | 57 | cook.h \ | 
| @@ -89,7 +90,8 @@ HEADERS += mainwindow.h \ | @@ -89,7 +90,8 @@ HEADERS += mainwindow.h \ | ||
| 89 | cookbook.h \ | 90 | cookbook.h \ | 
| 90 | define.h \ | 91 | define.h \ | 
| 91 | autocook.h \ | 92 | autocook.h \ | 
| 92 | - keepwarmpopup.h | 93 | + keepwarmpopup.h \ | 
| 94 | + errorpopupdlg.h | ||
| 93 | 95 | ||
| 94 | FORMS += mainwindow.ui \ | 96 | FORMS += mainwindow.ui \ | 
| 95 | manualcookwindow.ui \ | 97 | manualcookwindow.ui \ | 
| @@ -109,12 +111,11 @@ FORMS += mainwindow.ui \ | @@ -109,12 +111,11 @@ FORMS += mainwindow.ui \ | ||
| 109 | cooldownpopup.ui \ | 111 | cooldownpopup.ui \ | 
| 110 | engineermenuwindow.ui \ | 112 | engineermenuwindow.ui \ | 
| 111 | popupwindow.ui \ | 113 | popupwindow.ui \ | 
| 112 | - keepwarmpopup.ui | 114 | + keepwarmpopup.ui \ | 
| 115 | + errorpopupdlg.ui | ||
| 113 | 116 | ||
| 114 | RESOURCES += \ | 117 | RESOURCES += \ | 
| 115 | resources.qrc | 118 | resources.qrc | 
| 116 | 119 | ||
| 117 | target.path = /falinux/dev | 120 | target.path = /falinux/dev | 
| 118 | INSTALLS += target | 121 | INSTALLS += target | 
| 119 | - | ||
| 120 | -DISTFILES += | 
app/gui/oven_control/ovenstatics.cpp
| 1 | #include "ovenstatics.h" | 1 | #include "ovenstatics.h" | 
| 2 | #include <QtDebug> | 2 | #include <QtDebug> | 
| 3 | +#include <QApplication> | ||
| 4 | +#include <QTimer> | ||
| 3 | #include "mainwindow.h" | 5 | #include "mainwindow.h" | 
| 4 | #include "ovencontroller.h" | 6 | #include "ovencontroller.h" | 
| 5 | #include "popupwindow.h" | 7 | #include "popupwindow.h" | 
| 8 | +#include "engineermenuwindow.h" | ||
| 9 | +#include "errorpopupdlg.h" | ||
| 6 | 10 | ||
| 7 | OvenStatics* OvenStatics::p_singtonInstance=NULL; | 11 | OvenStatics* OvenStatics::p_singtonInstance=NULL; | 
| 8 | 12 | ||
| @@ -16,6 +20,9 @@ OvenStatics* OvenStatics::getInstance(QObject *parent, UdpHandler* udp, Oven* ov | @@ -16,6 +20,9 @@ OvenStatics* OvenStatics::getInstance(QObject *parent, UdpHandler* udp, Oven* ov | ||
| 16 | MainWindow* mw = (MainWindow*)parent; | 20 | MainWindow* mw = (MainWindow*)parent; | 
| 17 | connect(mw->pcombiButton, SIGNAL(clicked()),p_singtonInstance, SLOT(onDataChanged())); | 21 | connect(mw->pcombiButton, SIGNAL(clicked()),p_singtonInstance, SLOT(onDataChanged())); | 
| 18 | connect(p_singtonInstance->udp , SIGNAL(changed()), p_singtonInstance, SLOT(onDataChanged())); | 22 | connect(p_singtonInstance->udp , SIGNAL(changed()), p_singtonInstance, SLOT(onDataChanged())); | 
| 23 | + QTimer *timer = new QTimer(p_singtonInstance); | ||
| 24 | + connect(timer, SIGNAL(timeout()),p_singtonInstance,SLOT(oneSecTimerFired())); | ||
| 25 | + timer->start(1000); //1000ms fired | ||
| 19 | } | 26 | } | 
| 20 | return p_singtonInstance; | 27 | return p_singtonInstance; | 
| 21 | } | 28 | } | 
| @@ -30,6 +37,9 @@ OvenStatics::OvenStatics(QObject* parent) :QObject(parent) | @@ -30,6 +37,9 @@ OvenStatics::OvenStatics(QObject* parent) :QObject(parent) | ||
| 30 | { | 37 | { | 
| 31 | curdoorstate = false; | 38 | curdoorstate = false; | 
| 32 | curSysErrorState = 0; | 39 | curSysErrorState = 0; | 
| 40 | + curCommErrorState = 0; | ||
| 41 | + curSensorErrorState = 0; | ||
| 42 | + bDataRefreshed = false; | ||
| 33 | srvdatas = new servicedatas(); | 43 | srvdatas = new servicedatas(); | 
| 34 | srvdatas->loadServiceDatas(); | 44 | srvdatas->loadServiceDatas(); | 
| 35 | } | 45 | } | 
| @@ -43,12 +53,15 @@ void OvenStatics::onDataChanged() | @@ -43,12 +53,15 @@ void OvenStatics::onDataChanged() | ||
| 43 | { | 53 | { | 
| 44 | error_item *item; | 54 | error_item *item; | 
| 45 | time_t ltime=0; | 55 | time_t ltime=0; | 
| 56 | + uint16_t errstatetemp; | ||
| 46 | qDebug() << "statics event fired"; | 57 | qDebug() << "statics event fired"; | 
| 47 | return; | 58 | return; | 
| 48 | udp->fillControl(control); | 59 | udp->fillControl(control); | 
| 49 | udp->fillData(state); | 60 | udp->fillData(state); | 
| 61 | + bDataRefreshed = true; | ||
| 50 | time(<ime); | 62 | time(<ime); | 
| 51 | 63 | ||
| 64 | + | ||
| 52 | if(oven->cooking() && control.system){ | 65 | if(oven->cooking() && control.system){ | 
| 53 | if(state.door_state ==1 && curdoorstate==0){ | 66 | if(state.door_state ==1 && curdoorstate==0){ | 
| 54 | //door error | 67 | //door error | 
| @@ -58,66 +71,327 @@ void OvenStatics::onDataChanged() | @@ -58,66 +71,327 @@ void OvenStatics::onDataChanged() | ||
| 58 | item->last_fried = ltime; | 71 | item->last_fried = ltime; | 
| 59 | } | 72 | } | 
| 60 | curdoorstate = state.door_state; | 73 | curdoorstate = state.door_state; | 
| 61 | - if(state.system_error!=0 && state.system_error != curSysErrorState){ | ||
| 62 | - processSystemError(state.system_error,ltime); | ||
| 63 | - } | ||
| 64 | - curSysErrorState = state.system_error; | ||
| 65 | } | 74 | } | 
| 66 | 75 | ||
| 76 | + if(state.system_error!=0 && state.system_error != curSysErrorState){ | ||
| 77 | + processSystemError( state.system_error,ltime); | ||
| 78 | + } | ||
| 79 | + curSysErrorState = state.system_error; | ||
| 80 | + | ||
| 81 | + errstatetemp = state.reserved2f; | ||
| 82 | + if(errstatetemp!=0 && errstatetemp != curCommErrorState ){ | ||
| 83 | + processCommError( errstatetemp,ltime ); | ||
| 84 | + } | ||
| 85 | + curCommErrorState = errstatetemp; | ||
| 86 | + | ||
| 87 | + errstatetemp = state.reserved30; | ||
| 88 | + if(errstatetemp!=0 && errstatetemp != curSensorErrorState ){ | ||
| 89 | + processCommError( errstatetemp,ltime ); | ||
| 90 | + } | ||
| 91 | + curSensorErrorState = errstatetemp; | ||
| 92 | + | ||
| 93 | + | ||
| 94 | +} | ||
| 95 | + | ||
| 96 | +void OvenStatics::processSensorError(uint16_t errflag, time_t ltime){ | ||
| 97 | + error_item *item; | ||
| 98 | + QString strMsg = ""; | ||
| 99 | + uint8_t state; | ||
| 100 | + if( control.system==0 && !oven->cooking()) state = SYS_OFF_COOK_OFF; | ||
| 101 | + else if(control.system != 0 && !oven->cooking()) state = SYS_ON_COOK_OFF; | ||
| 102 | + else if(control.system !=0 && oven->cooking()) state = SYS_ON_COOK_ON; | ||
| 103 | + else state = SYS_ON_COOK_OFF; | ||
| 104 | + | ||
| 105 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_1)){ | ||
| 106 | + item = &(srvdatas->err_log.items.inner_temp_fail); | ||
| 107 | + strMsg = tr("내부 온도 이상 발생"); | ||
| 108 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_1],strMsg,ltime); | ||
| 109 | + } | ||
| 110 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_2)){ | ||
| 111 | + item = &(srvdatas->err_log.items.qunching_temp_fail); | ||
| 112 | + strMsg = tr("퀀칭 온도 이상 발생"); | ||
| 113 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_2],strMsg,ltime); | ||
| 114 | + } | ||
| 115 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_3)){ | ||
| 116 | + //Reserved allerrornoe 설정 | ||
| 117 | + item = &(srvdatas->err_log.items.qunching_temp_fail); | ||
| 118 | + strMsg = tr("퀀칭 온도 이상 발생"); | ||
| 119 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_3],strMsg,ltime); | ||
| 120 | + } | ||
| 121 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_4)){ | ||
| 122 | + item = &(srvdatas->err_log.items.wall_temp1_fail); | ||
| 123 | + strMsg = tr("벽면 온도 이상 발생"); | ||
| 124 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_4],strMsg,ltime); | ||
| 125 | + } | ||
| 126 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_5)){ | ||
| 127 | + item = &(srvdatas->err_log.items.steam_gen_temp_fail); | ||
| 128 | + strMsg = tr("스팀제네레이터 온도 이상 발생"); | ||
| 129 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_5],strMsg,ltime); | ||
| 130 | + } | ||
| 131 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_6)){ | ||
| 132 | + item = &(srvdatas->err_log.items.meatprove_temp1_fail); | ||
| 133 | + strMsg = tr("미트프로브 온도 이상 발생"); | ||
| 134 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_6],strMsg,ltime); | ||
| 135 | + } | ||
| 136 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_7)){ | ||
| 137 | + //Reseved | ||
| 138 | + item = &(srvdatas->err_log.items.meatprove_temp2_fail); | ||
| 139 | + strMsg = tr("미트프로브2 온도 이상 발생"); | ||
| 140 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_7],strMsg,ltime); | ||
| 141 | + } | ||
| 142 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_8)){ | ||
| 143 | + //Reserved | ||
| 144 | + item = &(srvdatas->err_log.items.meatprove_temp3_fail); | ||
| 145 | + strMsg = tr("미트프로브3 온도 이상 발생"); | ||
| 146 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_8],strMsg,ltime); | ||
| 147 | + } | ||
| 148 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_9)){ | ||
| 149 | + //Reserved | ||
| 150 | + item = &(srvdatas->err_log.items.meatprove_temp4_fail); | ||
| 151 | + strMsg = tr("미트프로브4 온도 이상 발생"); | ||
| 152 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_9],strMsg,ltime); | ||
| 153 | + } | ||
| 154 | + if(errflag & MAKE_MASK(SENSOR_ERR_SENSOR_10)){ | ||
| 155 | + item = &(srvdatas->err_log.items.pcb_temp_fail); | ||
| 156 | + strMsg = tr("PCB 온도 이상 발생"); | ||
| 157 | + processErrorItems(item,sensor_err_type_def[state][SENSOR_ERR_SENSOR_10],strMsg,ltime); | ||
| 158 | + } | ||
| 159 | +} | ||
| 160 | + | ||
| 161 | +void OvenStatics::processCommError(uint16_t errflag, time_t ltime){ | ||
| 162 | + error_item *item; | ||
| 163 | + QString strMsg = ""; | ||
| 164 | + uint8_t state; | ||
| 165 | + if( control.system==0 && !oven->cooking()) state = SYS_OFF_COOK_OFF; | ||
| 166 | + else if(control.system != 0 && !oven->cooking()) state = SYS_ON_COOK_OFF; | ||
| 167 | + else if(control.system !=0 && oven->cooking()) state = SYS_ON_COOK_ON; | ||
| 168 | + else state = SYS_ON_COOK_OFF; | ||
| 169 | + | ||
| 170 | + if(errflag & MAKE_MASK(COMM_ERR_BUNNER1)){ | ||
| 171 | + item = &(srvdatas->err_log.items.upper_pan_fail); | ||
| 172 | + strMsg = tr("상부 송풍기 이상 발생"); | ||
| 173 | + processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER1],strMsg,ltime); | ||
| 174 | + } | ||
| 175 | + if(errflag & MAKE_MASK(COMM_ERR_BUNNER2)){ | ||
| 176 | + item = &(srvdatas->err_log.items.lower_pan_fail); | ||
| 177 | + strMsg = tr("하부 송풍기 이상 발생"); | ||
| 178 | + processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,ltime); | ||
| 179 | + } | ||
| 180 | + if(errflag & MAKE_MASK(COMM_ERR_BUNNER3)){ | ||
| 181 | + item = &(srvdatas->err_log.items.steam_pan_fail); | ||
| 182 | + strMsg = tr("스팀 송풍기 이상 발생"); | ||
| 183 | + processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER3],strMsg,ltime); | ||
| 184 | + } | ||
| 185 | + if(errflag & MAKE_MASK(COMM_ERR_LOWERPAN)){ | ||
| 186 | + item = &(srvdatas->err_log.items.lower_motor_fail); | ||
| 187 | + strMsg = tr("상부 모터 컨트롤러 이상 발생"); | ||
| 188 | + processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,ltime); | ||
| 189 | + } | ||
| 190 | + if(errflag & MAKE_MASK(COMM_ERR_UPPERFAN)){ | ||
| 191 | + item = &(srvdatas->err_log.items.upper_motor_fail); | ||
| 192 | + strMsg = tr("상부 모터 컨트롤러 이상 발생"); | ||
| 193 | + processErrorItems(item,comm_err_type_def[state][COMM_ERR_BUNNER2],strMsg,ltime); | ||
| 194 | + } | ||
| 67 | } | 195 | } | 
| 68 | 196 | ||
| 69 | void OvenStatics::processSystemError(uint16_t errflag,time_t ltime){ | 197 | void OvenStatics::processSystemError(uint16_t errflag,time_t ltime){ | 
| 70 | error_item *item; | 198 | error_item *item; | 
| 71 | - if( errflag & SYS_ERR_FIRE_TRIGGER1){ | 199 | + QString strMsg = ""; | 
| 200 | + uint8_t state; | ||
| 201 | + if( control.system==0 && !oven->cooking()) state = SYS_OFF_COOK_OFF; | ||
| 202 | + else if(control.system != 0 && !oven->cooking()) state = SYS_ON_COOK_OFF; | ||
| 203 | + else if(control.system !=0 && oven->cooking()) state = SYS_ON_COOK_ON; | ||
| 204 | + else state = SYS_ON_COOK_OFF; | ||
| 205 | + | ||
| 206 | + if( errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER1)){ | ||
| 72 | //버너 컨트롤러 1 착화 이상 | 207 | //버너 컨트롤러 1 착화 이상 | 
| 73 | item = &(srvdatas->err_log.items.upper_fire_fail); | 208 | item = &(srvdatas->err_log.items.upper_fire_fail); | 
| 74 | - item->fired_cnt+=1; | ||
| 75 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 76 | - item->last_fried = ltime; | 209 | + strMsg = tr("상부 버너 착하가 되지 않습니다."); | 
| 210 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_FIRE_TRIGGER1],strMsg,ltime); | ||
| 77 | } | 211 | } | 
| 78 | - if(errflag & SYS_ERR_FIRE_TRIGGER2){ | 212 | + if(errflag & MAKE_MASK(SYS_ERR_FIRE_TRIGGER2)){ | 
| 79 | //버너 컨트롤러 2 착화 이상 | 213 | //버너 컨트롤러 2 착화 이상 | 
| 80 | item = &(srvdatas->err_log.items.lower_fire_fail); | 214 | item = &(srvdatas->err_log.items.lower_fire_fail); | 
| 81 | - item->fired_cnt+=1; | ||
| 82 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 83 | - item->last_fried = ltime; | 215 | + strMsg = tr("하부 버너 착하가 되지 않습니다."); | 
| 216 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_FIRE_TRIGGER2],strMsg,ltime); | ||
| 84 | } | 217 | } | 
| 85 | if(errflag & SYS_ERR_FIRE_TRIGGER3){ | 218 | if(errflag & SYS_ERR_FIRE_TRIGGER3){ | 
| 86 | item = &(srvdatas->err_log.items.steam_fire_fail); | 219 | item = &(srvdatas->err_log.items.steam_fire_fail); | 
| 87 | - item->fired_cnt+=1; | ||
| 88 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 89 | - item->last_fried = ltime; | 220 | + strMsg = tr("스팀 버너 착하가 되지 않습니다."); | 
| 221 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_FIRE_TRIGGER3],strMsg,ltime); | ||
| 90 | } | 222 | } | 
| 91 | - if(errflag & SYS_ERR_OVNE_TEMP_ALARM){ | 223 | + if(errflag & MAKE_MASK(SYS_ERR_OVNE_TEMP_ALARM)){ | 
| 92 | item = &(srvdatas->err_log.items.inner_temp_high_alarm); | 224 | item = &(srvdatas->err_log.items.inner_temp_high_alarm); | 
| 93 | - item->fired_cnt+=1; | ||
| 94 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 95 | - item->last_fried = ltime; | 225 | + strMsg = tr("내부 온도 과열 발생."); | 
| 226 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_OVNE_TEMP_ALARM],strMsg,ltime); | ||
| 96 | } | 227 | } | 
| 97 | - if(errflag & SYS_ERR_QUN_TEMP_ALARM){ | ||
| 98 | - //퀀칭 온도 센서 과열 -> 에러 항목 없으며 통신이상과 동일 처리 | ||
| 99 | - item = &(srvdatas->err_log.items.qunching_temp_fail); | ||
| 100 | - item->fired_cnt+=1; | ||
| 101 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 102 | - item->last_fried = ltime; | 228 | + if(errflag & MAKE_MASK(SYS_ERR_QUN_TEMP_ALARM)){ | 
| 229 | + //퀀칭 온도 센서 과열 | ||
| 230 | + item = &(srvdatas->err_log.items.qunching_temp_high_alarm); | ||
| 231 | + strMsg = tr("퀀칭 온도 센서 이상 발생."); | ||
| 232 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_QUN_TEMP_ALARM],strMsg,ltime); | ||
| 103 | } | 233 | } | 
| 104 | - if(errflag & SYS_ERR_CENTER_TEMP_ALARM){ | ||
| 105 | - item = &(srvdatas->err_log.items.meat_prove_temp1_fail); | ||
| 106 | - item->fired_cnt+=1; | ||
| 107 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 108 | - item->last_fried = ltime; | 234 | + if(errflag & MAKE_MASK(SYS_ERR_CENTER_TEMP_ALARM)){ | 
| 235 | + //중심 온도 과열 | ||
| 236 | + item = &(srvdatas->err_log.items.meatprove_temp1_high_alarm); | ||
| 237 | + strMsg = tr("미트프로브 온도 센서 이상 발생."); | ||
| 238 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_CENTER_TEMP_ALARM],strMsg,ltime); | ||
| 109 | } | 239 | } | 
| 110 | - if(errflag & SYS_ERR_WALL_TEMP_ALARM){ | ||
| 111 | - item = &(srvdatas->err_log.items.wall_temp1_fail); | ||
| 112 | - item->fired_cnt+=1; | ||
| 113 | - if(item->first_fired == 0) item->first_fired = ltime; | ||
| 114 | - item->last_fried = ltime; | 240 | + if(errflag & MAKE_MASK(SYS_ERR_WALL_TEMP_ALARM)){ | 
| 241 | + item = &(srvdatas->err_log.items.wall_temp1_high_alarm); | ||
| 242 | + strMsg = tr("벽면 온도 센서 이상 발생."); | ||
| 243 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_WALL_TEMP_ALARM],strMsg,ltime); | ||
| 244 | + } | ||
| 245 | + if(errflag & MAKE_MASK(SYS_ERR_WATER_SPLY_FAIL)){ | ||
| 246 | + //급수 이상 -> 유량 센서 이상 | ||
| 247 | + item = &(srvdatas->err_log.items.water_level_sensor_fail); | ||
| 248 | + strMsg = tr("급수가 되지 않습니다."); | ||
| 249 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_SPLY_FAIL],strMsg,ltime); | ||
| 115 | } | 250 | } | 
| 116 | - if(errflag & SYS_ERR_WATER_SPLY_FAIL){ | ||
| 117 | - //급수 이상 -> 수위 센서 이상으로 통일 | 251 | + if(errflag & MAKE_MASK(SYS_ERR_WATER_LEVEL_FAIL)){ | 
| 252 | + //급수 이상 -> 수위 센서 이상 | ||
| 118 | item = &(srvdatas->err_log.items.water_level_sensor_fail); | 253 | item = &(srvdatas->err_log.items.water_level_sensor_fail); | 
| 254 | + strMsg = tr("급수가 되지 않습니다."); | ||
| 255 | + processErrorItems(item, sys_err_type_def[state][SYS_ERR_WATER_LEVEL_FAIL],strMsg,ltime); | ||
| 256 | + } | ||
| 257 | +} | ||
| 258 | + | ||
| 259 | + | ||
| 260 | + | ||
| 261 | + | ||
| 262 | +bool OvenStatics::getNeedErrorClear(){ | ||
| 263 | + return bNeedErrorClear; | ||
| 264 | +} | ||
| 265 | + | ||
| 266 | +void OvenStatics::clearNeedErrorClear(){ | ||
| 267 | + //에러클리어 송신 후 flag clear | ||
| 268 | + bNeedErrorClear = false; | ||
| 269 | +} | ||
| 270 | + | ||
| 271 | +void OvenStatics::oneSecTimerFired(void){ | ||
| 272 | + if(bDataRefreshed) bDataRefreshed= false; | ||
| 273 | + else{ | ||
| 274 | + udp->fillControl(control); | ||
| 275 | + udp->fillData(state); | ||
| 276 | + } | ||
| 277 | + //가열부 시간 측정 | ||
| 278 | + if( (state.onoff_state1 & LOAD_STATE1_STEAM_BUNNER) !=0){ | ||
| 279 | + srvdatas->use_log.items.steam_heat +=1; | ||
| 280 | + } | ||
| 281 | + if( (state.onoff_state1 & (LOAD_STATE1_UPPER_BUNNER | LOAD_STATE1_LOWER_FAN))!=0){ | ||
| 282 | + srvdatas->use_log.items.dry_heat+=1; | ||
| 283 | + if(state.onoff_state1 & (LOAD_STATE1_UPPER_BUNNER)){ | ||
| 284 | + srvdatas->use_log.items.upper_heat +=1; | ||
| 285 | + } | ||
| 286 | + if((state.onoff_state2 & LOAD_STATE1_LOWER_BUNNER)!=0){ | ||
| 287 | + srvdatas->use_log.items.lower_heat +=1; | ||
| 288 | + } | ||
| 289 | + } | ||
| 290 | + //모드 시간 계산 | ||
| 291 | + if(state.cooking_mode !=0){ | ||
| 292 | + if(state.cooking_humidity==0){ | ||
| 293 | + //건열 모드 | ||
| 294 | + srvdatas->use_log.items.cook_dry_mode+=1; | ||
| 295 | + } | ||
| 296 | + else if(state.cooking_humidity ==100){ | ||
| 297 | + //스팀모드 | ||
| 298 | + srvdatas->use_log.items.cook_steam_mode+=1; | ||
| 299 | + } | ||
| 300 | + else srvdatas->use_log.items.cook_combi_mode+=1; | ||
| 301 | + } | ||
| 302 | + if(state.cleaning_mode !=0){ | ||
| 303 | + switch (state.cleaning_mode) { | ||
| 304 | + case (uint16_t)wash_mode_nocleanser: | ||
| 305 | + srvdatas->use_log.items.wash_mode_nocleanser+=1; | ||
| 306 | + break; | ||
| 307 | + case (uint16_t)wash_mode_simple: | ||
| 308 | + srvdatas->use_log.items.wash_mode_simple+=1; | ||
| 309 | + break; | ||
| 310 | + case (uint16_t)wash_mode_standard: | ||
| 311 | + srvdatas->use_log.items.wash_mode_standard+=1; | ||
| 312 | + break; | ||
| 313 | + case (uint16_t)wash_mode_strong: | ||
| 314 | + srvdatas->use_log.items.wash_mode_strong+=1; | ||
| 315 | + break; | ||
| 316 | + case (uint16_t)wash_mode_highspeed: | ||
| 317 | + srvdatas->use_log.items.wash_mode_speed+=1; | ||
| 318 | + break; | ||
| 319 | + default: | ||
| 320 | + break; | ||
| 321 | + } | ||
| 322 | + } | ||
| 323 | + if(control.cooldown ==1){ | ||
| 324 | + srvdatas->use_log.items.cooldown_mode+=1; | ||
| 325 | + } | ||
| 326 | + //부품 | ||
| 327 | + if(state.door_state ==1){ | ||
| 328 | + srvdatas->use_log.items.door_open+=1; | ||
| 329 | + } | ||
| 330 | + if(state.onoff_state2 !=0){ | ||
| 331 | + if( (state.onoff_state2 & LOAD_STATE2_DV)!=0){ | ||
| 332 | + srvdatas->use_log.items.dv_open+=1; | ||
| 333 | + } | ||
| 334 | + if((state.onoff_state2 & LOAD_STATE2_SSV)!=0){ | ||
| 335 | + srvdatas->use_log.items.ssv_open+=1; | ||
| 336 | + } | ||
| 337 | + if((state.onoff_state2 & LOAD_STATE2_QNV)!=0){ | ||
| 338 | + srvdatas->use_log.items.qnv_open+=1; | ||
| 339 | + } | ||
| 340 | + if((state.onoff_state2 & LOAD_STATE2_SNV)!=0){ | ||
| 341 | + srvdatas->use_log.items.snv_open+=1; | ||
| 342 | + } | ||
| 343 | + if((state.onoff_state2 & LOAD_STATE2_SSP)!=0){ | ||
| 344 | + srvdatas->use_log.items.ssp_open+=1; | ||
| 345 | + } | ||
| 346 | + if((state.onoff_state2 & LOAD_STATE2_HDM)!=0){ | ||
| 347 | + srvdatas->use_log.items.hdm_open+=1; | ||
| 348 | + } | ||
| 349 | + if((state.onoff_state2 & LOAD_STATE2_DP)!=0){ | ||
| 350 | + srvdatas->use_log.items.dp_open+=1; | ||
| 351 | + } | ||
| 352 | + if((state.onoff_state2 & LOAD_STATE2_UNP) !=0){ | ||
| 353 | + srvdatas->use_log.items.unp_open+=1; | ||
| 354 | + } | ||
| 355 | + } | ||
| 356 | +} | ||
| 357 | + | ||
| 358 | +void OvenStatics::processErrorItems(error_item *item, error_exe_type errtype, const QString &MsgDesc, time_t ltime){ | ||
| 359 | + | ||
| 360 | + if(errtype >= error_type_onlychk){ | ||
| 119 | item->fired_cnt+=1; | 361 | item->fired_cnt+=1; | 
| 120 | if(item->first_fired == 0) item->first_fired = ltime; | 362 | if(item->first_fired == 0) item->first_fired = ltime; | 
| 121 | item->last_fried = ltime; | 363 | item->last_fried = ltime; | 
| 122 | } | 364 | } | 
| 365 | + switch(errtype){ | ||
| 366 | + case error_type_onlypop: | ||
| 367 | + case error_type_popclr: | ||
| 368 | + case error_type_popnonclr: | ||
| 369 | + { | ||
| 370 | + errorPopupDlg *dlg = new errorPopupDlg(QApplication::activeWindow(),MsgDesc); | ||
| 371 | + dlg->exec(); | ||
| 372 | + break; | ||
| 373 | + } | ||
| 374 | + case error_type_engclr: | ||
| 375 | + case error_type_engnonclr: | ||
| 376 | + case error_type_onlyeng: | ||
| 377 | + { | ||
| 378 | + engineermenuwindow *w = new engineermenuwindow(QApplication::activeWindow()); | ||
| 379 | + w->showFullScreen(); | ||
| 380 | + break; | ||
| 381 | + } | ||
| 382 | + default: | ||
| 383 | + break; | ||
| 384 | + } | ||
| 385 | + if(errtype > error_type_clrsplit){ | ||
| 386 | + //에러 클리어 명령 송신 | ||
| 387 | + qDebug() << "send error clear command"; | ||
| 388 | + if(errtype == error_type_engclr){ | ||
| 389 | + //확인 후 송신 | ||
| 390 | + bNeedErrorClear = true; | ||
| 391 | + } | ||
| 392 | + else{ | ||
| 393 | + //에러클리어 메시지 즉시 송신 | ||
| 394 | + } | ||
| 395 | + } | ||
| 396 | + | ||
| 123 | } | 397 | } | 
app/gui/oven_control/ovenstatics.h
| @@ -8,17 +8,124 @@ | @@ -8,17 +8,124 @@ | ||
| 8 | #include "oven.h" | 8 | #include "oven.h" | 
| 9 | #include "servicedatas.h" | 9 | #include "servicedatas.h" | 
| 10 | 10 | ||
| 11 | +#define SYS_STATE_MAX 4 | ||
| 11 | 12 | ||
| 12 | -#define SYS_ERR_FIRE_TRIGGER1 0x0001 | ||
| 13 | -#define SYS_ERR_FIRE_TRIGGER2 0x0002 | ||
| 14 | -#define SYS_ERR_FIRE_TRIGGER3 0x0004 | ||
| 15 | -#define SYS_ERR_OVNE_TEMP_ALARM 0x0008 | ||
| 16 | -#define SYS_ERR_QUN_TEMP_ALARM 0x0010 | ||
| 17 | -#define SYS_ERR_CENTER_TEMP_ALARM 0x0020 | ||
| 18 | -#define SYS_ERR_WALL_TEMP_ALARM 0x0040 | ||
| 19 | -#define SYS_ERR_WATER_SPLY_FAIL 0x0080 | ||
| 20 | 13 | ||
| 14 | +#define SYS_ERR_MAX 10 | ||
| 21 | 15 | ||
| 16 | +#define SYS_ERR_MASK_ERR_CLEAR_COOKING 0x00ff | ||
| 17 | +#define SYS_ERR_MASK_ERR_CLEAR_NONCOOKING 0x00ff | ||
| 18 | +#define SYS_ERR_MASK_COOKING 0x00ff | ||
| 19 | +#define SYS_ERR_MASK_NONCOOKING (SYS_ERR_OVNE_TEMP_ALARM) | ||
| 20 | + | ||
| 21 | + | ||
| 22 | +#define COMM_ERR_MAX 5 | ||
| 23 | + | ||
| 24 | + | ||
| 25 | +#define COMM_ERR_MASK_ERR_CLEAR_COOKING 0x0000 | ||
| 26 | +#define COMM_ERR_MASK_ERR_CLEAR_NONCOOKING 0x0000 | ||
| 27 | + | ||
| 28 | +#define COMM_ERR_MASK_COOKING 0x0000 | ||
| 29 | +#define COMM_ERR_MASK_NONCOOKING 0x0000 | ||
| 30 | + | ||
| 31 | + | ||
| 32 | +#define SENSOR_ERR_MAX 10 | ||
| 33 | + | ||
| 34 | + | ||
| 35 | +#define SENSOR_ERR_MASK_ERR_CLEAR 0x0000 | ||
| 36 | +#define SENSOR_ERR_MASK_COOKING 0x0000 | ||
| 37 | +#define SENSOR_ERR_MASK_NONCOOKING 0x0000 | ||
| 38 | + | ||
| 39 | +#define MAKE_MASK(MASK) (1<<MASK) | ||
| 40 | + | ||
| 41 | +#define LOAD_STATE1_UPPER_BUNNER 0x0001 | ||
| 42 | +#define LOAD_STATE1_LOWER_BUNNER 0x0002 | ||
| 43 | +#define LOAD_STATE1_STEAM_BUNNER 0x0004 | ||
| 44 | +#define LOAD_STATE1_UPPER_FAN 0x0008 | ||
| 45 | +#define LOAD_STATE1_LOWER_FAN 0x0010 | ||
| 46 | +#define LOAD_STATE1_STEAM_FAN 0x0020 | ||
| 47 | +#define LOAD_STATE1_CONVEC_FAN1 0x0040 | ||
| 48 | +#define LOAD_STATE1_CONVEC_FAN2 0x0080 | ||
| 49 | + | ||
| 50 | +#define LOAD_STATE2_DV 0x0001 | ||
| 51 | +#define LOAD_STATE2_CFAN 0x0002 | ||
| 52 | +#define LOAD_STATE2_WSV 0x0004 | ||
| 53 | +#define LOAD_STATE2_QNV 0x0008 | ||
| 54 | +#define LOAD_STATE2_SSV 0x0010 | ||
| 55 | +#define LOAD_STATE2_SNV 0x0020 | ||
| 56 | +#define LOAD_STATE2_ERRLED 0x0040 | ||
| 57 | +#define LOAD_STATE2_ATVLED 0x0080 | ||
| 58 | +#define LOAD_STATE2_HL 0x0100 | ||
| 59 | +#define LOAD_STATE2_DP 0x0200 | ||
| 60 | +#define LOAD_STATE2_SSP 0x0400 | ||
| 61 | +#define LOAD_STATE2_UNP 0x0800 | ||
| 62 | +#define LOAD_STATE2_HT1 0x1000 | ||
| 63 | +#define LOAD_STATE2_HT2 0x2000 | ||
| 64 | +#define LOAD_STATE2_HDM 0x4000 | ||
| 65 | +#define LOAD_STATE2_ST1 0x8000 | ||
| 66 | + | ||
| 67 | +enum sys_state_type{ | ||
| 68 | + SYS_OFF_COOK_OFF=0, | ||
| 69 | + SYS_ON_COOK_OFF=1, | ||
| 70 | + SYS_ON_COOK_ON=2, | ||
| 71 | + SYS_OFF_COOK_ON=3 //unnormal state | ||
| 72 | +}; | ||
| 73 | + | ||
| 74 | +enum sys_error_id{ | ||
| 75 | + SYS_ERR_FIRE_TRIGGER1 =0, | ||
| 76 | + SYS_ERR_FIRE_TRIGGER2 , | ||
| 77 | + SYS_ERR_FIRE_TRIGGER3 , | ||
| 78 | + SYS_ERR_OVNE_TEMP_ALARM , | ||
| 79 | + SYS_ERR_QUN_TEMP_ALARM , | ||
| 80 | + SYS_ERR_CENTER_TEMP_ALARM , | ||
| 81 | + SYS_ERR_WALL_TEMP_ALARM , | ||
| 82 | + SYS_ERR_STAM_TEMP_ALARM , | ||
| 83 | + SYS_ERR_WATER_LEVEL_FAIL , | ||
| 84 | + SYS_ERR_WATER_SPLY_FAIL | ||
| 85 | +}; | ||
| 86 | + | ||
| 87 | +enum comm_err_id{ | ||
| 88 | + COMM_ERR_BUNNER1 =0, | ||
| 89 | + COMM_ERR_BUNNER2 , | ||
| 90 | + COMM_ERR_BUNNER3 , | ||
| 91 | + COMM_ERR_UPPERFAN , | ||
| 92 | + COMM_ERR_LOWERPAN | ||
| 93 | +}; | ||
| 94 | + | ||
| 95 | +enum sensor_err_id{ | ||
| 96 | + SENSOR_ERR_SENSOR_1 =0, | ||
| 97 | + SENSOR_ERR_SENSOR_2 , | ||
| 98 | + SENSOR_ERR_SENSOR_3 , | ||
| 99 | + SENSOR_ERR_SENSOR_4 , | ||
| 100 | + SENSOR_ERR_SENSOR_5 , | ||
| 101 | + SENSOR_ERR_SENSOR_6 , | ||
| 102 | + SENSOR_ERR_SENSOR_7 , | ||
| 103 | + SENSOR_ERR_SENSOR_8 , | ||
| 104 | + SENSOR_ERR_SENSOR_9 , | ||
| 105 | + SENSOR_ERR_SENSOR_10 | ||
| 106 | +}; | ||
| 107 | + | ||
| 108 | +enum error_exe_type{ | ||
| 109 | + error_type_allnone=0, | ||
| 110 | + error_type_onlypop, | ||
| 111 | + error_type_onlyeng, | ||
| 112 | + error_type_onlychk, | ||
| 113 | + error_type_popnonclr, | ||
| 114 | + error_type_engnonclr, | ||
| 115 | + error_type_clrsplit, | ||
| 116 | + error_type_chkclr, | ||
| 117 | + error_type_popclr, | ||
| 118 | + error_type_engclr, | ||
| 119 | +}; | ||
| 120 | + | ||
| 121 | + | ||
| 122 | +enum wash_mode_type{ | ||
| 123 | + wash_mode_nocleanser=1, | ||
| 124 | + wash_mode_simple, | ||
| 125 | + wash_mode_standard, | ||
| 126 | + wash_mode_strong, | ||
| 127 | + wash_mode_highspeed | ||
| 128 | +}; | ||
| 22 | 129 | ||
| 23 | class OvenStatics : public QObject | 130 | class OvenStatics : public QObject | 
| 24 | { | 131 | { | 
| @@ -26,9 +133,43 @@ class OvenStatics : public QObject | @@ -26,9 +133,43 @@ class OvenStatics : public QObject | ||
| 26 | public: | 133 | public: | 
| 27 | static OvenStatics* getInstance(QObject* parent = 0,UdpHandler * udp=0, Oven* oven=0); | 134 | static OvenStatics* getInstance(QObject* parent = 0,UdpHandler * udp=0, Oven* oven=0); | 
| 28 | static void destroy(); | 135 | static void destroy(); | 
| 29 | - | 136 | + bool getNeedErrorClear(); | 
| 137 | + void clearNeedErrorClear(); | ||
| 30 | 138 | ||
| 31 | private: | 139 | private: | 
| 140 | + | ||
| 141 | + const error_exe_type sys_err_type_def[SYS_STATE_MAX][SYS_ERR_MAX]={ | ||
| 142 | + {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr, | ||
| 143 | + error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_OFF_COOK_OFF state | ||
| 144 | + {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr, | ||
| 145 | + error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_ON_COOK_OFF state | ||
| 146 | + {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr, | ||
| 147 | + error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_ON_COOK_ON state | ||
| 148 | + {error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr, | ||
| 149 | + error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr,error_type_popclr}, // SYS_OFF_COOK_ON state | ||
| 150 | + }; | ||
| 151 | + | ||
| 152 | + const error_exe_type comm_err_type_def[SYS_STATE_MAX][COMM_ERR_MAX] ={\ | ||
| 153 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_engnonclr,error_type_engnonclr}, //SYS_OFF_COO_OFF | ||
| 154 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_engnonclr,error_type_engnonclr}, //SYS_ON_COO_OFF | ||
| 155 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_popnonclr}, //SYS_ON_COO_ON | ||
| 156 | + {error_type_popnonclr,error_type_popnonclr,error_type_popnonclr,error_type_engnonclr,error_type_engnonclr}, //SYS_OFF_COO_ON | ||
| 157 | + }; | ||
| 158 | + | ||
| 159 | + const error_exe_type sensor_err_type_def[SYS_STATE_MAX][SENSOR_ERR_MAX]={ | ||
| 160 | + {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk, | ||
| 161 | + error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_OFF_COOK_OFF state | ||
| 162 | + {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk, | ||
| 163 | + error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_ON_COOK_OFF state | ||
| 164 | + {error_type_onlychk,error_type_onlychk,error_type_allnone,error_type_popnonclr,error_type_popnonclr, | ||
| 165 | + error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_ON_COOK_ON state | ||
| 166 | + {error_type_engnonclr,error_type_popnonclr,error_type_allnone,error_type_popnonclr,error_type_onlychk, | ||
| 167 | + error_type_popnonclr,error_type_allnone,error_type_allnone,error_type_allnone,error_type_popnonclr}, // SYS_OFF_COOK_ON state same with SYS_OFF_COOK_OFF | ||
| 168 | + }; | ||
| 169 | + | ||
| 170 | + | ||
| 171 | + | ||
| 172 | + | ||
| 32 | static OvenStatics* p_singtonInstance; | 173 | static OvenStatics* p_singtonInstance; | 
| 33 | UdpHandler *udp; | 174 | UdpHandler *udp; | 
| 34 | Oven* oven; | 175 | Oven* oven; | 
| @@ -39,11 +180,20 @@ private: | @@ -39,11 +180,20 @@ private: | ||
| 39 | 180 | ||
| 40 | bool curdoorstate; | 181 | bool curdoorstate; | 
| 41 | uint16_t curSysErrorState; | 182 | uint16_t curSysErrorState; | 
| 183 | + uint16_t curCommErrorState; | ||
| 184 | + uint16_t curSensorErrorState; | ||
| 185 | + bool bNeedErrorClear; | ||
| 186 | + bool bDataRefreshed; | ||
| 42 | explicit OvenStatics(QObject* parent); | 187 | explicit OvenStatics(QObject* parent); | 
| 43 | ~OvenStatics(); | 188 | ~OvenStatics(); | 
| 44 | void processSystemError(uint16_t errflag,time_t ltime); | 189 | void processSystemError(uint16_t errflag,time_t ltime); | 
| 190 | + void processCommError(uint16_t errflag,time_t ltime); | ||
| 191 | + void processSensorError(uint16_t errflag, time_t ltime); | ||
| 192 | + void processErrorItems(error_item *item, error_exe_type errtype, const QString &MsgDesc, time_t ltime); | ||
| 193 | + | ||
| 45 | public slots: | 194 | public slots: | 
| 46 | void onDataChanged(); | 195 | void onDataChanged(); | 
| 196 | + void oneSecTimerFired(void); | ||
| 47 | }; | 197 | }; | 
| 48 | 198 | ||
| 49 | #endif // OVENSTATICS_H | 199 | #endif // OVENSTATICS_H | 
app/gui/oven_control/popupwindow.cpp
| 1 | #include "popupwindow.h" | 1 | #include "popupwindow.h" | 
| 2 | #include "ui_popupwindow.h" | 2 | #include "ui_popupwindow.h" | 
| 3 | +#include <QtDebug> | ||
| 3 | 4 | ||
| 4 | -popupWindow::popupWindow(QWidget *parent) : | 5 | +popupWindow::popupWindow(QWidget *parent,const QString &MsgDesc) : | 
| 5 | QMainWindow(parent), | 6 | QMainWindow(parent), | 
| 6 | ui(new Ui::popupWindow) | 7 | ui(new Ui::popupWindow) | 
| 7 | { | 8 | { | 
| @@ -11,9 +12,16 @@ popupWindow::popupWindow(QWidget *parent) : | @@ -11,9 +12,16 @@ popupWindow::popupWindow(QWidget *parent) : | ||
| 11 | 12 | ||
| 12 | ui->centralwidget->setAttribute(Qt::WA_TranslucentBackground); | 13 | ui->centralwidget->setAttribute(Qt::WA_TranslucentBackground); | 
| 13 | ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); | 14 | ui->centralwidget->setWindowFlags(Qt::FramelessWindowHint); | 
| 15 | + ui->ctrlWarnDescription->setText(MsgDesc); | ||
| 16 | + connect(ui->ctrlOkBtn, SIGNAL(clicked(bool)), this, SLOT(deleteLater())); | ||
| 14 | } | 17 | } | 
| 15 | 18 | ||
| 16 | popupWindow::~popupWindow() | 19 | popupWindow::~popupWindow() | 
| 17 | { | 20 | { | 
| 18 | delete ui; | 21 | delete ui; | 
| 19 | } | 22 | } | 
| 23 | + | ||
| 24 | +void popupWindow::on_ctrlOkBtn_released() | ||
| 25 | +{ | ||
| 26 | + qDebug() << "OK btn Released"; | ||
| 27 | +} | 
app/gui/oven_control/popupwindow.h
| @@ -12,9 +12,12 @@ class popupWindow : public QMainWindow | @@ -12,9 +12,12 @@ class popupWindow : public QMainWindow | ||
| 12 | Q_OBJECT | 12 | Q_OBJECT | 
| 13 | 13 | ||
| 14 | public: | 14 | public: | 
| 15 | - explicit popupWindow(QWidget *parent = 0); | 15 | + explicit popupWindow(QWidget *parent = 0, const QString &MsgDesc=0); | 
| 16 | ~popupWindow(); | 16 | ~popupWindow(); | 
| 17 | 17 | ||
| 18 | +private slots: | ||
| 19 | + void on_ctrlOkBtn_released(); | ||
| 20 | + | ||
| 18 | private: | 21 | private: | 
| 19 | Ui::popupWindow *ui; | 22 | Ui::popupWindow *ui; | 
| 20 | }; | 23 | }; | 
app/gui/oven_control/popupwindow.ui
| @@ -20,26 +20,31 @@ | @@ -20,26 +20,31 @@ | ||
| 20 | <widget class="QLabel" name="label_2"> | 20 | <widget class="QLabel" name="label_2"> | 
| 21 | <property name="geometry"> | 21 | <property name="geometry"> | 
| 22 | <rect> | 22 | <rect> | 
| 23 | - <x>50</x> | 23 | + <x>0</x> | 
| 24 | <y>500</y> | 24 | <y>500</y> | 
| 25 | - <width>800</width> | 25 | + <width>900</width> | 
| 26 | <height>400</height> | 26 | <height>400</height> | 
| 27 | </rect> | 27 | </rect> | 
| 28 | </property> | 28 | </property> | 
| 29 | <property name="styleSheet"> | 29 | <property name="styleSheet"> | 
| 30 | - <string notr="true">background-color: rgb(79, 79, 79);</string> | 30 | + <string notr="true">border-color: rgb(255,255,255); | 
| 31 | +border-width: 2px; | ||
| 32 | +border-style: solid;</string> | ||
| 31 | </property> | 33 | </property> | 
| 32 | <property name="text"> | 34 | <property name="text"> | 
| 33 | <string/> | 35 | <string/> | 
| 34 | </property> | 36 | </property> | 
| 37 | + <property name="pixmap"> | ||
| 38 | + <pixmap resource="resources.qrc">:/images/background/popup/503.png</pixmap> | ||
| 39 | + </property> | ||
| 35 | </widget> | 40 | </widget> | 
| 36 | <widget class="QLabel" name="label"> | 41 | <widget class="QLabel" name="label"> | 
| 37 | <property name="geometry"> | 42 | <property name="geometry"> | 
| 38 | <rect> | 43 | <rect> | 
| 39 | - <x>50</x> | 44 | + <x>90</x> | 
| 40 | <y>510</y> | 45 | <y>510</y> | 
| 41 | - <width>801</width> | ||
| 42 | - <height>41</height> | 46 | + <width>761</width> | 
| 47 | + <height>51</height> | ||
| 43 | </rect> | 48 | </rect> | 
| 44 | </property> | 49 | </property> | 
| 45 | <property name="font"> | 50 | <property name="font"> | 
| @@ -70,7 +75,7 @@ | @@ -70,7 +75,7 @@ | ||
| 70 | </property> | 75 | </property> | 
| 71 | <property name="font"> | 76 | <property name="font"> | 
| 72 | <font> | 77 | <font> | 
| 73 | - <pointsize>10</pointsize> | 78 | + <pointsize>12</pointsize> | 
| 74 | <weight>75</weight> | 79 | <weight>75</weight> | 
| 75 | <bold>true</bold> | 80 | <bold>true</bold> | 
| 76 | </font> | 81 | </font> | 
| @@ -85,21 +90,57 @@ | @@ -85,21 +90,57 @@ | ||
| 85 | <set>Qt::AlignCenter</set> | 90 | <set>Qt::AlignCenter</set> | 
| 86 | </property> | 91 | </property> | 
| 87 | </widget> | 92 | </widget> | 
| 88 | - <widget class="QPushButton" name="pushButton"> | 93 | + <widget class="QPushButton" name="ctrlOkBtn"> | 
| 89 | <property name="geometry"> | 94 | <property name="geometry"> | 
| 90 | <rect> | 95 | <rect> | 
| 91 | - <x>360</x> | ||
| 92 | - <y>780</y> | ||
| 93 | - <width>171</width> | ||
| 94 | - <height>61</height> | 96 | + <x>366</x> | 
| 97 | + <y>800</y> | ||
| 98 | + <width>152</width> | ||
| 99 | + <height>70</height> | ||
| 100 | + </rect> | ||
| 101 | + </property> | ||
| 102 | + <property name="sizePolicy"> | ||
| 103 | + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> | ||
| 104 | + <horstretch>0</horstretch> | ||
| 105 | + <verstretch>0</verstretch> | ||
| 106 | + </sizepolicy> | ||
| 107 | + </property> | ||
| 108 | + <property name="font"> | ||
| 109 | + <font> | ||
| 110 | + <pointsize>10</pointsize> | ||
| 111 | + <weight>75</weight> | ||
| 112 | + <bold>true</bold> | ||
| 113 | + </font> | ||
| 114 | + </property> | ||
| 115 | + <property name="styleSheet"> | ||
| 116 | + <string notr="true">QPushButton {border-image: url(:/images/button/152.png);} | ||
| 117 | +QPushButton::pressed {border-image: url(:/images/button/152_ov.png);} | ||
| 118 | +QPushButton { text-align:center;}</string> | ||
| 119 | + </property> | ||
| 120 | + <property name="text"> | ||
| 121 | + <string>확 인</string> | ||
| 122 | + </property> | ||
| 123 | + </widget> | ||
| 124 | + <widget class="QLabel" name="label_3"> | ||
| 125 | + <property name="geometry"> | ||
| 126 | + <rect> | ||
| 127 | + <x>340</x> | ||
| 128 | + <y>510</y> | ||
| 129 | + <width>61</width> | ||
| 130 | + <height>51</height> | ||
| 95 | </rect> | 131 | </rect> | 
| 96 | </property> | 132 | </property> | 
| 97 | <property name="text"> | 133 | <property name="text"> | 
| 98 | - <string>PushButton</string> | 134 | + <string/> | 
| 135 | + </property> | ||
| 136 | + <property name="pixmap"> | ||
| 137 | + <pixmap resource="resources.qrc">:/images/symbol/warning.png</pixmap> | ||
| 99 | </property> | 138 | </property> | 
| 100 | </widget> | 139 | </widget> | 
| 101 | </widget> | 140 | </widget> | 
| 102 | </widget> | 141 | </widget> | 
| 103 | - <resources/> | 142 | + <resources> | 
| 143 | + <include location="resources.qrc"/> | ||
| 144 | + </resources> | ||
| 104 | <connections/> | 145 | <connections/> | 
| 105 | </ui> | 146 | </ui> | 
app/gui/oven_control/servicedatas.cpp
| 1 | #include "string.h" | 1 | #include "string.h" | 
| 2 | #include "servicedatas.h" | 2 | #include "servicedatas.h" | 
| 3 | +#include <QDebug> | ||
| 3 | 4 | ||
| 4 | servicedatas::servicedatas() | 5 | servicedatas::servicedatas() | 
| 5 | { | 6 | { | 
| 7 | + qDebug()<< "Statics Data Size Report\r\n error_log size = " << sizeof(error_log) << " \r\nuse_static_log size = " << sizeof(use_statics_log); | ||
| 6 | memset((void*)err_log.datas,0x00,sizeof(error_log)); | 8 | memset((void*)err_log.datas,0x00,sizeof(error_log)); | 
| 9 | + memset((void*)use_log.datas,0x00,sizeof(use_statics_log)); | ||
| 10 | + | ||
| 7 | } | 11 | } | 
| 8 | 12 | ||
| 9 | bool servicedatas::loadServiceDatas(void){ | 13 | bool servicedatas::loadServiceDatas(void){ | 
app/gui/oven_control/servicedatas.h
| @@ -6,7 +6,9 @@ | @@ -6,7 +6,9 @@ | ||
| 6 | 6 | ||
| 7 | #define STRUCT_PACK __attribute__ ((packed)) | 7 | #define STRUCT_PACK __attribute__ ((packed)) | 
| 8 | 8 | ||
| 9 | -#define MAX_ERROR_TYPE_CNT 34 | 9 | +#define MAX_ERROR_TYPE_CNT 30 | 
| 10 | + | ||
| 11 | +#define MAX_STATICS_CNT 23 | ||
| 10 | 12 | ||
| 11 | typedef struct _error_item{ | 13 | typedef struct _error_item{ | 
| 12 | uint16_t fired_cnt; | 14 | uint16_t fired_cnt; | 
| @@ -21,46 +23,74 @@ typedef union _error_log{ | @@ -21,46 +23,74 @@ typedef union _error_log{ | ||
| 21 | struct{ | 23 | struct{ | 
| 22 | error_item door; | 24 | error_item door; | 
| 23 | error_item upper_fire_fail; | 25 | error_item upper_fire_fail; | 
| 24 | - error_item upper_fire_alarm; | ||
| 25 | error_item upper_pan_fail; | 26 | error_item upper_pan_fail; | 
| 26 | error_item lower_fire_fail; | 27 | error_item lower_fire_fail; | 
| 27 | - error_item lower_fire_alarm; | ||
| 28 | error_item lower_pan_fail; | 28 | error_item lower_pan_fail; | 
| 29 | error_item steam_fire_fail; | 29 | error_item steam_fire_fail; | 
| 30 | - error_item steam_fire_alarm; | ||
| 31 | error_item steam_pan_fail; | 30 | error_item steam_pan_fail; | 
| 32 | error_item water_level_sensor_fail; | 31 | error_item water_level_sensor_fail; | 
| 33 | error_item water_flow_sensor_fail; | 32 | error_item water_flow_sensor_fail; | 
| 33 | + error_item inner_temp_high_alarm; //B1 Sensor | ||
| 34 | error_item inner_temp_fail; | 34 | error_item inner_temp_fail; | 
| 35 | - error_item inner_temp_high_alarm; | 35 | + error_item qunching_temp_high_alarm; //B2 Sensor | 
| 36 | error_item qunching_temp_fail; | 36 | error_item qunching_temp_fail; | 
| 37 | - error_item meat_prove_temp1_fail; | ||
| 38 | - error_item meatprove_temp2_fail; | ||
| 39 | - error_item meatprove_temp3_fail; | ||
| 40 | - error_item meatprove_temp4_fail; | 37 | + error_item meatprove_temp1_high_alarm; //B3 Sensor | 
| 38 | + error_item meatprove_temp1_fail; | ||
| 39 | + error_item wall_temp1_high_alarm; //B4 Sensor | ||
| 41 | error_item wall_temp1_fail; | 40 | error_item wall_temp1_fail; | 
| 42 | - error_item wall_temp2_fail; | 41 | + error_item steam_gen_temp_high_alram; //B5 Sensor | 
| 43 | error_item steam_gen_temp_fail; | 42 | error_item steam_gen_temp_fail; | 
| 43 | + error_item meatprove_temp2_fail; | ||
| 44 | + error_item meatprove_temp3_fail; | ||
| 45 | + error_item meatprove_temp4_fail; | ||
| 46 | + error_item pcb_temp_high_alarm; //PCB Temp | ||
| 44 | error_item pcb_temp_fail; | 47 | error_item pcb_temp_fail; | 
| 45 | - error_item upper_motor_noncook_fail; | ||
| 46 | - error_item upper_motor_cook_fail; | ||
| 47 | - error_item lower_motor_noncook_fail; | ||
| 48 | - error_item lower_motor_cook_fail; | 48 | + error_item upper_motor_fail; | 
| 49 | + error_item lower_motor_fail; | ||
| 49 | error_item small_motor_fail; | 50 | error_item small_motor_fail; | 
| 50 | error_item midd_motor_fail; | 51 | error_item midd_motor_fail; | 
| 51 | - error_item supply_motor_fail; // Steam Generator Tank Supply Pump | 52 | + error_item supply_motor_fail; // Steam Generator Tank Supply Pump | 
| 52 | error_item humidity_tamper_fail; | 53 | error_item humidity_tamper_fail; | 
| 53 | }items; | 54 | }items; | 
| 54 | }STRUCT_PACK error_log; | 55 | }STRUCT_PACK error_log; | 
| 55 | 56 | ||
| 56 | 57 | ||
| 57 | - | 58 | +typedef union _use_statics_log{ | 
| 59 | + uint8_t datas[MAX_STATICS_CNT*4]; | ||
| 60 | + uint32_t values[MAX_STATICS_CNT]; | ||
| 61 | + struct{ | ||
| 62 | + uint32_t steam_heat; | ||
| 63 | + uint32_t dry_heat; | ||
| 64 | + uint32_t upper_heat; | ||
| 65 | + uint32_t lower_heat; | ||
| 66 | + uint32_t cook_dry_mode; | ||
| 67 | + uint32_t cook_steam_mode; | ||
| 68 | + uint32_t cook_combi_mode; | ||
| 69 | + uint32_t wash_mode_nocleanser; | ||
| 70 | + uint32_t wash_mode_simple; | ||
| 71 | + uint32_t wash_mode_standard; | ||
| 72 | + uint32_t wash_mode_strong; | ||
| 73 | + uint32_t wash_mode_speed; | ||
| 74 | + uint32_t cooldown_mode; | ||
| 75 | + uint32_t door_open; | ||
| 76 | + uint32_t dv_open; | ||
| 77 | + uint32_t ssv_open; | ||
| 78 | + uint32_t qnv_open; | ||
| 79 | + uint32_t ssp_open; | ||
| 80 | + uint32_t snv_open; | ||
| 81 | + uint32_t hosereel; | ||
| 82 | + uint32_t hdm_open; | ||
| 83 | + uint32_t dp_open; | ||
| 84 | + uint32_t unp_open; | ||
| 85 | + }items; | ||
| 86 | +}STRUCT_PACK use_statics_log; | ||
| 58 | 87 | ||
| 59 | class servicedatas | 88 | class servicedatas | 
| 60 | { | 89 | { | 
| 61 | public: | 90 | public: | 
| 62 | servicedatas(); | 91 | servicedatas(); | 
| 63 | error_log err_log; | 92 | error_log err_log; | 
| 93 | + use_statics_log use_log; | ||
| 64 | bool saveServiceDatas(void); | 94 | bool saveServiceDatas(void); | 
| 65 | bool loadServiceDatas(void); | 95 | bool loadServiceDatas(void); | 
| 66 | }; | 96 | }; |