From 6e338d03f2e8536ab763af945b6ed75cd4c817c8 Mon Sep 17 00:00:00 2001 From: victor <taehoon@falinux.com> Date: Tue, 11 Jul 2017 16:47:09 +0900 Subject: [PATCH] =?UTF-8?q?=EC=97=B0=EC=86=8C=EA=B0=80=EC=8A=A4=EB=8F=99?= =?UTF-8?q?=EC=9E=91=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/gui/oven_control/functiontestwindow.cpp | 23 +- app/gui/oven_control/functiontestwindow.h | 6 + app/gui/oven_control/functiontestwindow.ui | 190 ++++++++++++-- app/gui/oven_control/gastestwindow.cpp | 285 ++++++++++++++++++++- app/gui/oven_control/gastestwindow.h | 37 ++- app/gui/oven_control/gastestwindow.ui | 382 +++++++++++++++++++++++++++- app/gui/oven_control/udphandler.h | 2 + 7 files changed, 889 insertions(+), 36 deletions(-) diff --git a/app/gui/oven_control/functiontestwindow.cpp b/app/gui/oven_control/functiontestwindow.cpp index 600df62..8302d3a 100644 --- a/app/gui/oven_control/functiontestwindow.cpp +++ b/app/gui/oven_control/functiontestwindow.cpp @@ -25,6 +25,8 @@ FunctionTestWindow::FunctionTestWindow(QWidget *parent) : ui->clockContainer->setParent(ui->upperStack); setAttribute(Qt::WA_DeleteOnClose); + ui->gasTestContainer->hide(); + foreach (QPushButton *button, findChildren<QPushButton *>()) connect(button, &QPushButton::pressed, SoundPlayer::playClick); @@ -103,8 +105,25 @@ void FunctionTestWindow::on_fanTestButton_clicked() void FunctionTestWindow::on_gasTestButton_clicked() { -// GasTestWindow *w = new GasTestWindow(this, udp); - // w->showFullScreen(); + ui->gasTestContainer->show(); +} + +void FunctionTestWindow::on_upperGasTestButton_clicked() +{ + GasTestWindow *w = new GasTestWindow(GasTestWindow::Upper, this); + w->showFullScreen(); +} + +void FunctionTestWindow::on_lowerGasTestButton_clicked() +{ + GasTestWindow *w = new GasTestWindow(GasTestWindow::Lower, this); + w->showFullScreen(); +} + +void FunctionTestWindow::on_steamGasTestButton_clicked() +{ + GasTestWindow *w = new GasTestWindow(GasTestWindow::Steam, this); + w->showFullScreen(); } void FunctionTestWindow::onEncoderLeft() diff --git a/app/gui/oven_control/functiontestwindow.h b/app/gui/oven_control/functiontestwindow.h index b174f9d..04061aa 100644 --- a/app/gui/oven_control/functiontestwindow.h +++ b/app/gui/oven_control/functiontestwindow.h @@ -33,6 +33,12 @@ private slots: void on_gasTestButton_clicked(); + void on_upperGasTestButton_clicked(); + + void on_lowerGasTestButton_clicked(); + + void on_steamGasTestButton_clicked(); + void on_adjustBlowerFan_clicked(); private: diff --git a/app/gui/oven_control/functiontestwindow.ui b/app/gui/oven_control/functiontestwindow.ui index 1585be6..2cff8a3 100644 --- a/app/gui/oven_control/functiontestwindow.ui +++ b/app/gui/oven_control/functiontestwindow.ui @@ -107,7 +107,7 @@ <property name="geometry"> <rect> <x>127</x> - <y>616</y> + <y>600</y> <width>379</width> <height>70</height> </rect> @@ -138,7 +138,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_o <property name="geometry"> <rect> <x>127</x> - <y>710</y> + <y>680</y> <width>379</width> <height>70</height> </rect> @@ -169,7 +169,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_o <property name="geometry"> <rect> <x>127</x> - <y>804</y> + <y>760</y> <width>379</width> <height>70</height> </rect> @@ -200,7 +200,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_o <property name="geometry"> <rect> <x>127</x> - <y>898</y> + <y>842</y> <width>379</width> <height>70</height> </rect> @@ -231,7 +231,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_o <property name="geometry"> <rect> <x>127</x> - <y>992</y> + <y>927</y> <width>379</width> <height>70</height> </rect> @@ -262,7 +262,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_o <property name="geometry"> <rect> <x>127</x> - <y>1086</y> + <y>1090</y> <width>379</width> <height>70</height> </rect> @@ -501,7 +501,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>651</y> + <y>635</y> <width>30</width> <height>1</height> </rect> @@ -514,9 +514,9 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>79</x> - <y>580</y> + <y>571</y> <width>41</width> - <height>631</height> + <height>554</height> </rect> </property> <property name="orientation"> @@ -527,7 +527,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>745</y> + <y>715</y> <width>30</width> <height>1</height> </rect> @@ -540,7 +540,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>839</y> + <y>795</y> <width>30</width> <height>1</height> </rect> @@ -553,7 +553,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>933</y> + <y>877</y> <width>30</width> <height>1</height> </rect> @@ -566,7 +566,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>1027</y> + <y>962</y> <width>30</width> <height>1</height> </rect> @@ -579,7 +579,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>1121</y> + <y>1045</y> <width>30</width> <height>1</height> </rect> @@ -592,7 +592,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>100</x> - <y>1209</y> + <y>1124</y> <width>30</width> <height>1</height> </rect> @@ -605,7 +605,7 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/b <property name="geometry"> <rect> <x>128</x> - <y>1175</y> + <y>1010</y> <width>379</width> <height>70</height> </rect> @@ -632,8 +632,164 @@ QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_o <string>송풍기 교정</string> </property> </widget> - <zorder>line</zorder> + <widget class="QWidget" name="gasTestContainer" native="true"> + <property name="geometry"> + <rect> + <x>90</x> + <y>1150</y> + <width>521</width> + <height>261</height> + </rect> + </property> + <widget class="Line" name="line_9"> + <property name="geometry"> + <rect> + <x>70</x> + <y>0</y> + <width>41</width> + <height>224</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + </widget> + <widget class="QPushButton" name="steamGasTestButton"> + <property name="geometry"> + <rect> + <x>118</x> + <y>189</y> + <width>379</width> + <height>70</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>NanumGothic</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url(:/images/button/379.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string> + </property> + <property name="text"> + <string>스팀용송풍기</string> + </property> + </widget> + <widget class="QPushButton" name="lowerGasTestButton"> + <property name="geometry"> + <rect> + <x>119</x> + <y>109</y> + <width>379</width> + <height>70</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>NanumGothic</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url(:/images/button/379.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string> + </property> + <property name="text"> + <string>건열부송풍기(하)</string> + </property> + </widget> + <widget class="QPushButton" name="upperGasTestButton"> + <property name="geometry"> + <rect> + <x>118</x> + <y>26</y> + <width>379</width> + <height>70</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>NanumGothic</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url(:/images/button/379.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/379_ov.png); }</string> + </property> + <property name="text"> + <string>건열부송풍기(상)</string> + </property> + </widget> + <widget class="Line" name="line_10"> + <property name="geometry"> + <rect> + <x>91</x> + <y>144</y> + <width>30</width> + <height>1</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + <widget class="Line" name="line_11"> + <property name="geometry"> + <rect> + <x>91</x> + <y>223</y> + <width>30</width> + <height>1</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + <widget class="Line" name="line_12"> + <property name="geometry"> + <rect> + <x>91</x> + <y>61</y> + <width>30</width> + <height>1</height> + </rect> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + </widget> + </widget> + <zorder>gasTestContainer</zorder> <zorder>line_2</zorder> + <zorder>line</zorder> <zorder>upperStack</zorder> <zorder>widget</zorder> <zorder>burnerTestButton</zorder> diff --git a/app/gui/oven_control/gastestwindow.cpp b/app/gui/oven_control/gastestwindow.cpp index 03d649b..60cf980 100644 --- a/app/gui/oven_control/gastestwindow.cpp +++ b/app/gui/oven_control/gastestwindow.cpp @@ -2,26 +2,48 @@ #include "ui_gastestwindow.h" #include <QKeyEvent> +#include <QDebug> #include "soundplayer.h" +#include "config.h" -GasTestWindow::GasTestWindow(QWidget *parent, UdpHandler *udp) : +GasTestWindow::GasTestWindow(Target target, QWidget *parent) : QMainWindow(parent), - ui(new Ui::GasTestWindow), udp(udp) + ui(new Ui::GasTestWindow), target(target) { ui->setupUi(this); ui->clockContainer->setParent(ui->upperStack); setAttribute(Qt::WA_DeleteOnClose); - foreach (QPushButton *button, findChildren<QPushButton *>()) - connect(button, &QPushButton::pressed, SoundPlayer::playClick); + switch (target) + { + case Upper: + ui->titleLabel->setText(tr("서비스단계(엔지니어모드) > 기능테스트 > 연소가스동작 > 건열송풍기(상)")); + break; + case Lower: + ui->titleLabel->setText(tr("서비스단계(엔지니어모드) > 기능테스트 > 연소가스동작 > 건열송풍기(하)")); + break; + case Steam: + ui->titleLabel->setText(tr("서비스단계(엔지니어모드) > 기능테스트 > 연소가스동작 > 스팀용송풍기")); + break; + } + udp = UdpHandler::getInstance(); + udp->set(TG_OVEN_MODE, 4); connect(udp, SIGNAL(changed()), this, SLOT(onDataChanged())); + + stopTimer.setInterval(60 * 1000); + connect(&stopTimer, SIGNAL(timeout()), SLOT(stop())); + + foreach (QPushButton *button, findChildren<QPushButton *>()) + connect(button, &QPushButton::pressed, SoundPlayer::playClick); } GasTestWindow::~GasTestWindow() { + stop(); + delete ui; } @@ -60,9 +82,264 @@ void GasTestWindow::keyReleaseEvent(QKeyEvent *event) } } +void GasTestWindow::updateView() +{ + ui->rpmLabel->setText(QString("%1 rpm").arg(currentRpm())); + + switch (phase) + { + case Min: + ui->minButton->setText(isRunning() ? "STOP" : "START"); + ui->maxButton->setText("START"); + break; + case Max: + ui->minButton->setText("START"); + ui->maxButton->setText(isRunning() ? "STOP" : "START"); + break; + default: + ui->minButton->setText("START"); + ui->maxButton->setText("START"); + } +} + void GasTestWindow::onDataChanged() { + switch (phase) + { + case MinStopping: + case MaxStopping: + if (!isRunning()) + phase = Idle; + default: + break; + } + + updateView(); +} + +void GasTestWindow::startMin() +{ + switch (target) + { + case Upper: + runUpper(minRpm()); + break; + case Lower: + runLower(minRpm()); + break; + case Steam: + runSteam(minRpm()); + break; + } + + stopTimer.start(); + + phase = Min; +} + +void GasTestWindow::startMax() +{ + switch (target) + { + case Upper: + runUpper(maxRpm()); + break; + case Lower: + runLower(maxRpm()); + break; + case Steam: + runSteam(maxRpm()); + break; + } + + stopTimer.start(); + + phase = Max; +} + +void GasTestWindow::stop() +{ + if (stopTimer.isActive()) + stopTimer.stop(); + + switch (target) + { + case Upper: + stopUpper(); + break; + case Lower: + stopLower(); + break; + case Steam: + stopSteam(); + break; + } + switch (phase) + { + case Min: + phase = MinStopping; + break; + case Max: + phase = MaxStopping; + break; + default: + break; + } +} + +void GasTestWindow::runUpper(int rpm) +{ + udp->set(TG_BUNNER1_RPM, rpm); + udp->turnOn(TG_BUNNER1_MANUAL); + udp->turnOn(TG_BUNNER1_FAN); + udp->turnOn(TG_MANUAL_BURNER1); + + udp->set(TG_FAN1_DIRECTOIN, 0); + udp->set(TG_FAN1_RPM, 1175); + udp->turnOn(TG_FAN1_MANUAL); + udp->turnOn(TG_MANUAL_FAN1); +} + +void GasTestWindow::runLower(int rpm) +{ + udp->set(TG_BUNNER2_RPM, rpm); + udp->turnOn(TG_BUNNER2_MANUAL); + udp->turnOn(TG_BUNNER2_FAN); + udp->turnOn(TG_MANUAL_BURNER2); + + udp->set(TG_FAN2_DIRECTOIN, 0); + udp->set(TG_FAN2_RPM, 1175); + udp->turnOn(TG_FAN2_MANUAL); + udp->turnOn(TG_MANUAL_FAN2); +} + +void GasTestWindow::runSteam(int rpm) +{ + udp->set(TG_BUNNER3_RPM, rpm); + udp->turnOn(TG_BUNNER3_MANUAL); + udp->turnOn(TG_BUNNER3_FAN); + udp->turnOn(TG_MANUAL_BURNER3); +} + +void GasTestWindow::stopUpper() +{ + udp->turnOff(TG_MANUAL_BURNER1); + udp->turnOff(TG_BUNNER1_MANUAL); + udp->turnOff(TG_BUNNER1_FAN); + + udp->turnOff(TG_MANUAL_FAN1); + udp->turnOff(TG_FAN1_MANUAL); +} + +void GasTestWindow::stopLower() +{ + udp->turnOff(TG_MANUAL_BURNER2); + udp->turnOff(TG_BUNNER2_MANUAL); + udp->turnOff(TG_BUNNER2_FAN); + + udp->turnOff(TG_MANUAL_FAN2); + udp->turnOff(TG_FAN2_MANUAL); +} + +void GasTestWindow::stopSteam() +{ + udp->turnOff(TG_MANUAL_BURNER3); + udp->turnOff(TG_BUNNER3_MANUAL); + udp->turnOff(TG_BUNNER3_FAN); +} + +int GasTestWindow::minRpm() +{ + Config *config = Config::getInstance(); + + switch (target) + { + case Upper: + case Lower: + if (isHalf()) + return config->getConfigValue(Define::config_burner23_pwr1_half_rpm).d32; + else + return config->getConfigValue(Define::config_burner23_pwr1_normal_rpm).d32; + case Steam: + default: + if (isHalf()) + return config->getConfigValue(Define::config_burner1_pwr1_half_rpm).d32; + else + return config->getConfigValue(Define::config_burner1_pwr1_normal_rpm).d32; + } +} + +int GasTestWindow::maxRpm() +{ + Config *config = Config::getInstance(); + + switch (target) + { + case Upper: + case Lower: + if (isHalf()) + return config->getConfigValue(Define::config_burner23_pwr2_half_rpm).d32; + else + return config->getConfigValue(Define::config_burner23_pwr2_normal_rpm).d32; + case Steam: + default: + if (isHalf()) + return config->getConfigValue(Define::config_burner1_pwr2_half_rpm).d32; + else + return config->getConfigValue(Define::config_burner1_pwr2_normal_rpm).d32; + } +} + +bool GasTestWindow::isHalf() +{ + return Config::getInstance()->getConfigValue(Define::config_set_half_energy).d32 > 0; +} + +bool GasTestWindow::isRunning() +{ + switch (target) + { + case Upper: + return udp->burner1() || udp->burnerFan1(); + case Lower: + return udp->burner2() || udp->burnerFan2(); + case Steam: + return udp->burner3() || udp->burnerFan3(); + default: + return false; + } +} + +int GasTestWindow::currentRpm() +{ + switch (target) + { + case Upper: + return udp->getData().burner1_current_rpm; + case Lower: + return udp->getData().burner2_current_rpm; + case Steam: + return udp->getData().burner3_current_rpm; + default: + return 0; + } +} + +void GasTestWindow::on_minButton_clicked() +{ + if (isRunning() && (phase == Min || phase == MinStopping)) + stop(); + else + startMin(); +} + +void GasTestWindow::on_maxButton_clicked() +{ + if (isRunning() && (phase == Max || phase == MaxStopping)) + stop(); + else + startMax(); } void GasTestWindow::on_backButton_clicked() diff --git a/app/gui/oven_control/gastestwindow.h b/app/gui/oven_control/gastestwindow.h index 6c1c6a8..5a80e39 100644 --- a/app/gui/oven_control/gastestwindow.h +++ b/app/gui/oven_control/gastestwindow.h @@ -2,6 +2,7 @@ #define GASTESTWINDOW_H #include <QMainWindow> +#include <QTimer> #include "udphandler.h" @@ -14,7 +15,17 @@ class GasTestWindow : public QMainWindow Q_OBJECT public: - explicit GasTestWindow(QWidget *parent = 0, UdpHandler *udp = 0); + enum Target { + Upper, Lower, Steam + }; + + enum Phase { + Idle, + Min, MinStopping, + Max, MaxStopping + }; + + explicit GasTestWindow(Target target, QWidget *parent = 0); ~GasTestWindow(); protected: @@ -22,13 +33,37 @@ protected: void keyReleaseEvent(QKeyEvent *event); private slots: + void updateView(); void onDataChanged(); + void startMin(); + void startMax(); + void stop(); + + void runUpper(int rpm); + void runLower(int rpm); + void runSteam(int rpm); + void stopUpper(); + void stopLower(); + void stopSteam(); + int minRpm(); + int maxRpm(); + + bool isHalf(); + bool isRunning(); + int currentRpm(); + + void on_minButton_clicked(); + void on_maxButton_clicked(); void on_backButton_clicked(); + private: Ui::GasTestWindow *ui; UdpHandler *udp; + Target target; + Phase phase = Idle; + QTimer stopTimer; QWidget *pushed = NULL; diff --git a/app/gui/oven_control/gastestwindow.ui b/app/gui/oven_control/gastestwindow.ui index 3ae93cd..de381e7 100644 --- a/app/gui/oven_control/gastestwindow.ui +++ b/app/gui/oven_control/gastestwindow.ui @@ -110,18 +110,18 @@ </property> <property name="styleSheet"> <string notr="true">QPushButton { border-image: url(:/images/bottom_bar/back.png); } -QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</string> +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/bottom_bar/back_ov.png); }</string> </property> <property name="text"> <string/> </property> </widget> </widget> - <widget class="QPushButton" name="pushButton_4"> + <widget class="QPushButton" name="minButton"> <property name="geometry"> <rect> - <x>580</x> - <y>640</y> + <x>697</x> + <y>890</y> <width>184</width> <height>70</height> </rect> @@ -134,23 +134,379 @@ QPushButton:pressed { border-image: url(:/images/bottom_bar/back_ov.png); }</str </property> <property name="font"> <font> + <family>Roboto</family> + <pointsize>10</pointsize> <weight>75</weight> <bold>true</bold> </font> </property> <property name="styleSheet"> - <string notr="true">QPushButton { - border-image: url(:/images/images/config_service/090_set_eng_btn_03.png); -} - -QPushButton:pressed { - border-image: url(:/images/images/config_service/090_set_eng_btn_03_ov.png); -}</string> + <string notr="true">QPushButton { border-image: url(:/images/button/184.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/184_ov.png); }</string> </property> <property name="text"> <string>START</string> </property> </widget> + <widget class="QLabel" name="label_9"> + <property name="geometry"> + <rect> + <x>55</x> + <y>550</y> + <width>231</width> + <height>70</height> + </rect> + </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>123</red> + <green>123</green> + <blue>123</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="font"> + <font> + <family>Malgun Gothic</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>RPM</string> + </property> + </widget> + <widget class="QLabel" name="label_11"> + <property name="geometry"> + <rect> + <x>55</x> + <y>1020</y> + <width>331</width> + <height>70</height> + </rect> + </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>123</red> + <green>123</green> + <blue>123</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="font"> + <font> + <family>Malgun Gothic</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>Max-RPM</string> + </property> + </widget> + <widget class="QLabel" name="label_10"> + <property name="geometry"> + <rect> + <x>55</x> + <y>785</y> + <width>271</width> + <height>70</height> + </rect> + </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>123</red> + <green>123</green> + <blue>123</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="font"> + <font> + <family>Malgun Gothic</family> + <pointsize>12</pointsize> + </font> + </property> + <property name="text"> + <string>Min-RPM</string> + </property> + </widget> + <widget class="QLabel" name="label_6"> + <property name="geometry"> + <rect> + <x>18</x> + <y>980</y> + <width>863</width> + <height>1</height> + </rect> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources.qrc">:/images/line/manual_core_temp_horizontal.png</pixmap> + </property> + </widget> + <widget class="QLabel" name="titleLabel"> + <property name="geometry"> + <rect> + <x>55</x> + <y>426</y> + <width>845</width> + <height>84</height> + </rect> + </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>123</red> + <green>123</green> + <blue>123</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="font"> + <font> + <family>Malgun Gothic</family> + <pointsize>9</pointsize> + </font> + </property> + <property name="text"> + <string>서비스단계(엔지니어모드) > 기능테스트 > 연소가스동작 > 건열송풍기(상)</string> + </property> + </widget> + <widget class="QPushButton" name="maxButton"> + <property name="geometry"> + <rect> + <x>697</x> + <y>1125</y> + <width>184</width> + <height>70</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>Roboto</family> + <pointsize>10</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">QPushButton { border-image: url(:/images/button/184.png); } +QPushButton:pressed, QPushButton:focus { border-image: url(:/images/button/184_ov.png); }</string> + </property> + <property name="text"> + <string>START</string> + </property> + </widget> + <widget class="QLabel" name="label_12"> + <property name="geometry"> + <rect> + <x>18</x> + <y>745</y> + <width>863</width> + <height>1</height> + </rect> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources.qrc">:/images/line/manual_core_temp_horizontal.png</pixmap> + </property> + </widget> + <widget class="QLabel" name="label_13"> + <property name="geometry"> + <rect> + <x>18</x> + <y>1215</y> + <width>863</width> + <height>1</height> + </rect> + </property> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources.qrc">:/images/line/manual_core_temp_horizontal.png</pixmap> + </property> + </widget> + <widget class="QLabel" name="rpmLabel"> + <property name="geometry"> + <rect> + <x>55</x> + <y>610</y> + <width>231</width> + <height>70</height> + </rect> + </property> + <property name="palette"> + <palette> + <active> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </active> + <inactive> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>255</red> + <green>255</green> + <blue>255</blue> + </color> + </brush> + </colorrole> + </inactive> + <disabled> + <colorrole role="WindowText"> + <brush brushstyle="SolidPattern"> + <color alpha="255"> + <red>123</red> + <green>123</green> + <blue>123</blue> + </color> + </brush> + </colorrole> + </disabled> + </palette> + </property> + <property name="font"> + <font> + <family>Malgun Gothic</family> + <pointsize>11</pointsize> + </font> + </property> + <property name="text"> + <string>0 rpm</string> + </property> + </widget> </widget> </widget> <customwidgets> @@ -181,6 +537,8 @@ QPushButton:pressed { <header>digitalclock.h</header> </customwidget> </customwidgets> - <resources/> + <resources> + <include location="resources.qrc"/> + </resources> <connections/> </ui> diff --git a/app/gui/oven_control/udphandler.h b/app/gui/oven_control/udphandler.h index 7a70209..272032b 100644 --- a/app/gui/oven_control/udphandler.h +++ b/app/gui/oven_control/udphandler.h @@ -31,6 +31,8 @@ public: bool init(); + const oven_control_t &getControl() { return control; } + const oven_state_t &getData() { return state; } bool burner1() { return (state.onoff_state1 & 0x0001) != 0; } bool burner2() { return (state.onoff_state1 & 0x0002) != 0; } -- 2.1.4