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.

42 lines
611 B

  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /*
  3. * Qt mutizone MQTT thermostat
  4. *
  5. * Copyright (C) 2019 Richard Genoud
  6. *
  7. */
  8. #ifndef BACKGROUNDLOOP_H
  9. #define BACKGROUNDLOOP_H
  10. #include <QThread>
  11. enum power_states {
  12. OFF,
  13. ON,
  14. AUTO,
  15. MAX_POWER_STATES
  16. };
  17. class BackgroundLoop : public QThread
  18. {
  19. Q_OBJECT
  20. public:
  21. BackgroundLoop();
  22. ~BackgroundLoop();
  23. public slots:
  24. void onNewPowerState(enum power_states state);
  25. private:
  26. void run() override;
  27. void allHeatersOn(bool on);
  28. enum power_states m_pwr_state;
  29. };
  30. #endif // BACKGROUNDLOOP_H
  31. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */