|
|
@ -175,6 +175,9 @@ bool MainWindow::get_heater_order(int room_idx) |
|
|
|
if (m_zones.at(room_idx)->m_temperature_value == FORCE_OFF) { |
|
|
|
goto out; |
|
|
|
} |
|
|
|
if (!m_zones.at(room_idx)->m_available) { |
|
|
|
goto out; |
|
|
|
} |
|
|
|
|
|
|
|
/* TODO: make it smarter */ |
|
|
|
if (qFabs(get_target_temperature(room_idx) |
|
|
@ -292,10 +295,13 @@ void MainWindow::availability_slot(int idx, bool ok) |
|
|
|
{ |
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
|
|
|
|
if ((idx < s->nbZones()) && !ok) { |
|
|
|
m_zones.at(idx)->m_hygro_value = 0; |
|
|
|
m_zones.at(idx)->m_temperature_value = 0; |
|
|
|
m_zones.at(idx)->refresh(); |
|
|
|
if (idx < s->nbZones()) { |
|
|
|
m_zones.at(idx)->m_available = ok; |
|
|
|
if (!ok) { |
|
|
|
m_zones.at(idx)->m_hygro_value = 0; |
|
|
|
m_zones.at(idx)->m_temperature_value = 0; |
|
|
|
m_zones.at(idx)->refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|