Browse Source

thermostat: fix holiday bug (order was not applied)

master
Richard Genoud 5 years ago
parent
commit
2b3698012a
1 changed files with 18 additions and 18 deletions
  1. +18
    -18
      soft/thermostat/src/mainwindow.cpp

+ 18
- 18
soft/thermostat/src/mainwindow.cpp View File

@ -433,25 +433,25 @@ void MainWindow::apply_order_to_heaters(void)
if (m_end_holiday > QDate::currentDate()) {
qDebug() << "Holiday mode => emit ALL_OFF order";
emit setAllHeatersOn(false);
}
switch (s->m_state) {
case AUTO:
qDebug() << "apply AUTO state";
apply_automatic_state();
break;
case ON:
heating_order = true;
/* fall through */
case OFF:
/* fall through */
default:
emit setAllHeatersOn(heating_order);
for (int i = 0; i < s->m_rooms.count(); i++) {
m_zones.at(i)->refresh();
} else {
switch (s->m_state) {
case AUTO:
qDebug() << "apply AUTO state";
apply_automatic_state();
break;
case ON:
heating_order = true;
/* fall through */
case OFF:
/* fall through */
default:
emit setAllHeatersOn(heating_order);
for (int i = 0; i < s->m_rooms.count(); i++) {
m_zones.at(i)->refresh();
}
break;
}
break;
}
}


Loading…
Cancel
Save