|
|
@ -32,6 +32,8 @@ MainWindow::MainWindow(QWidget *parent) : |
|
|
|
connect(mqttclient, SIGNAL(new_hygro(unsigned, double)), |
|
|
|
this, SLOT(hygro_slot(unsigned, double))); |
|
|
|
|
|
|
|
connect(mqttclient, SIGNAL(new_availability(unsigned, bool)), |
|
|
|
this, SLOT(availability_slot(unsigned, bool))); |
|
|
|
/*
|
|
|
|
* Sensors-related layout |
|
|
|
*/ |
|
|
@ -77,5 +79,12 @@ void MainWindow::hygro_slot(unsigned idx, double val) |
|
|
|
m_zones[idx]->set_hygro_value(val); |
|
|
|
} |
|
|
|
} |
|
|
|
void MainWindow::availability_slot(unsigned idx, bool ok) |
|
|
|
{ |
|
|
|
if ((idx < NB_ZONES) && !ok) { |
|
|
|
m_zones[idx]->set_hygro_value(0); |
|
|
|
m_zones[idx]->set_temperature_value(0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */ |