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 | 10 | QWidget(parent), |
11 | 11 | ui(new Ui::CooldownPopup), |
12 | 12 | oven(oven), |
13 | - showingCurrentTemp(false) | |
13 | + showingCurrentTemp(false), | |
14 | + needCookStarting(false) | |
14 | 15 | { |
15 | 16 | ui->setupUi(this); |
16 | 17 | |
... | ... | @@ -37,6 +38,9 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : |
37 | 38 | expectingFanLevel = oven->maxFan(); |
38 | 39 | started = false; |
39 | 40 | opened = false; |
41 | + needCookStarting = oven->cooking(); | |
42 | + if (needCookStarting) | |
43 | + oven->stopCooking(); | |
40 | 44 | |
41 | 45 | connect(oven, SIGNAL(changed(Oven*)), SLOT(updateView())); |
42 | 46 | |
... | ... | @@ -71,6 +75,9 @@ CooldownPopup::CooldownPopup(QWidget *parent, Oven *oven) : |
71 | 75 | |
72 | 76 | CooldownPopup::~CooldownPopup() |
73 | 77 | { |
78 | + if (needCookStarting) | |
79 | + oven->startCooking(); | |
80 | + | |
74 | 81 | delete ui; |
75 | 82 | } |
76 | 83 | |
... | ... | @@ -114,6 +121,9 @@ void CooldownPopup::start() |
114 | 121 | started = true; |
115 | 122 | opened = false; |
116 | 123 | |
124 | + oven->setFan(expectingFanLevel); | |
125 | + oven->startCooldown(); | |
126 | + | |
117 | 127 | checkOvenTimer.start(); |
118 | 128 | |
119 | 129 | updateView(); |
... | ... | @@ -205,8 +215,6 @@ void CooldownPopup::checkOven() |
205 | 215 | if (oven->door()) |
206 | 216 | { |
207 | 217 | opened = true; |
208 | - oven->setFan(expectingFanLevel); | |
209 | - oven->startCooldown(); | |
210 | 218 | } |
211 | 219 | } |
212 | 220 | else | ... | ... |