|
|
@ -63,7 +63,7 @@ MainWindow::MainWindow(QWidget *parent) : |
|
|
|
mainLayout->addWidget(m_zones.at(3), 1, 1); |
|
|
|
mainLayout->addWidget(m_state_btn, 1, 2); |
|
|
|
} |
|
|
|
update_state_btn(s->m_state); |
|
|
|
update_state_btn(s->getPowerState()); |
|
|
|
|
|
|
|
QSizePolicy *szPolicy = new QSizePolicy(QSizePolicy::Minimum, |
|
|
|
QSizePolicy::MinimumExpanding, |
|
|
@ -406,21 +406,21 @@ void MainWindow::change_state(void) |
|
|
|
{ |
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
|
|
|
|
switch (s->m_state) { |
|
|
|
switch (s->getPowerState()) { |
|
|
|
case OFF: |
|
|
|
s->m_state = ON; |
|
|
|
s->setPowerState(ON); |
|
|
|
break; |
|
|
|
case ON: |
|
|
|
s->m_state = AUTO; |
|
|
|
s->setPowerState(AUTO); |
|
|
|
break; |
|
|
|
case AUTO: |
|
|
|
/* fall through */ |
|
|
|
default: |
|
|
|
s->m_state = OFF; |
|
|
|
s->setPowerState(OFF); |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
update_state_btn(s->m_state); |
|
|
|
update_state_btn(s->getPowerState()); |
|
|
|
|
|
|
|
apply_order_to_heaters(); |
|
|
|
} |
|
|
@ -434,7 +434,7 @@ void MainWindow::apply_order_to_heaters(void) |
|
|
|
qDebug() << "Holiday mode => emit ALL_OFF order"; |
|
|
|
emit setAllHeatersOn(false); |
|
|
|
} else { |
|
|
|
switch (s->m_state) { |
|
|
|
switch (s->getPowerState()) { |
|
|
|
case AUTO: |
|
|
|
qDebug() << "apply AUTO state"; |
|
|
|
apply_automatic_state(); |
|
|
|