Ajout Thermostat
This commit is contained in:
21
Thermostat/include/thermostat.h
Normal file
21
Thermostat/include/thermostat.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
enum ThermostatMode { MODE_OFF, MODE_CONFORT, MODE_ECO, MODE_BOOST, MODE_HORS_GEL };
|
||||
|
||||
class Thermostat {
|
||||
public:
|
||||
Thermostat();
|
||||
void setMode(ThermostatMode mode);
|
||||
void setTemperature(float temp);
|
||||
void setPresetTemp(ThermostatMode mode, float temp);
|
||||
void update(float currentTemp);
|
||||
bool isHeating() const;
|
||||
ThermostatMode getMode() const;
|
||||
float getTargetTemp() const;
|
||||
private:
|
||||
ThermostatMode mode;
|
||||
float presetTemps[5];
|
||||
float targetTemp;
|
||||
bool heating;
|
||||
};
|
||||
Reference in New Issue
Block a user