Commit 6fbaea2a7d330dd8fcff7ae755acb4fb0a826477
1 parent
2bc03da304
Exists in
master
and in
2 other branches
수동 요리 동작 변경
- 요리 중 쿨다운 팝업에 들어가면 요리 중단 후 쿨다운 끝난 뒤 요리 재시작
Showing
2 changed files
with
12 additions
and
3 deletions
Show diff stats
app/gui/oven_control/cooldownpopup.cpp
@@ -10,7 +10,8 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : | @@ -10,7 +10,8 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : | ||
10 | QWidget(parent), | 10 | QWidget(parent), |
11 | ui(new Ui::CooldownPopup), | 11 | ui(new Ui::CooldownPopup), |
12 | oven(oven), | 12 | oven(oven), |
13 | - showingCurrentTemp(false) | 13 | + showingCurrentTemp(false), |
14 | + needCookStarting(false) | ||
14 | { | 15 | { |
15 | ui->setupUi(this); | 16 | ui->setupUi(this); |
16 | 17 | ||
@@ -37,6 +38,9 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : | @@ -37,6 +38,9 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : | ||
37 | expectingFanLevel = oven->maxFan(); | 38 | expectingFanLevel = oven->maxFan(); |
38 | started = false; | 39 | started = false; |
39 | opened = false; | 40 | opened = false; |
41 | + needCookStarting = oven->cooking(); | ||
42 | + if (needCookStarting) | ||
43 | + oven->stopCooking(); | ||
40 | 44 | ||
41 | connect(oven, SIGNAL(changed(Oven*)), SLOT(updateView())); | 45 | connect(oven, SIGNAL(changed(Oven*)), SLOT(updateView())); |
42 | 46 | ||
@@ -71,6 +75,9 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : | @@ -71,6 +75,9 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : | ||
71 | 75 | ||
72 | CooldownPopup::~CooldownPopup() | 76 | CooldownPopup::~CooldownPopup() |
73 | { | 77 | { |
78 | + if (needCookStarting) | ||
79 | + oven->startCooking(); | ||
80 | + | ||
74 | delete ui; | 81 | delete ui; |
75 | } | 82 | } |
76 | 83 | ||
@@ -114,6 +121,9 @@ void CooldownPopup::start() | @@ -114,6 +121,9 @@ void CooldownPopup::start() | ||
114 | started = true; | 121 | started = true; |
115 | opened = false; | 122 | opened = false; |
116 | 123 | ||
124 | + oven->setFan(expectingFanLevel); | ||
125 | + oven->startCooldown(); | ||
126 | + | ||
117 | checkOvenTimer.start(); | 127 | checkOvenTimer.start(); |
118 | 128 | ||
119 | updateView(); | 129 | updateView(); |
@@ -205,8 +215,6 @@ void CooldownPopup::checkOven() | @@ -205,8 +215,6 @@ void CooldownPopup::checkOven() | ||
205 | if (oven->door()) | 215 | if (oven->door()) |
206 | { | 216 | { |
207 | opened = true; | 217 | opened = true; |
208 | - oven->setFan(expectingFanLevel); | ||
209 | - oven->startCooldown(); | ||
210 | } | 218 | } |
211 | } | 219 | } |
212 | else | 220 | else |
app/gui/oven_control/cooldownpopup.h
@@ -61,6 +61,7 @@ private: | @@ -61,6 +61,7 @@ private: | ||
61 | int expectingFanLevel; | 61 | int expectingFanLevel; |
62 | bool started; | 62 | bool started; |
63 | bool opened; | 63 | bool opened; |
64 | + bool needCookStarting; | ||
64 | 65 | ||
65 | int lastDisplayedFanLevel; | 66 | int lastDisplayedFanLevel; |
66 | bool lastDisplayedHumidification; | 67 | bool lastDisplayedHumidification; |