Thermostat pour piloter jusqu'à 4 radiateurs avec fil pilote
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

51 lines
831 B

// SPDX-License-Identifier: GPL-3.0-or-later
/*
* Qt mutizone MQTT thermostat
*
* Copyright (C) 2019 Richard Genoud
*
*/
#ifndef BACKGROUNDLOOP_H
#define BACKGROUNDLOOP_H
#include <QThread>
#include "mqttclient.h"
enum power_states {
OFF,
ON,
AUTO,
MAX_POWER_STATES
};
class BackgroundLoop : public QThread
{
Q_OBJECT
public:
BackgroundLoop();
~BackgroundLoop();
public slots:
void onNewPowerState(enum power_states state);
private:
void run() override;
void allHeatersOn(bool on);
MQTTClient *m_mqtt;
enum power_states m_pwr_state;
signals:
void new_temperature(int idx, double val);
void new_hygro(int idx, double val);
void new_battery(int idx, double val);
void new_availability(int idx, bool ok);
};
#endif // BACKGROUNDLOOP_H
/* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */