a
This commit is contained in:
@@ -77,7 +77,9 @@ class FanState {
|
||||
int newThresLow = root["temperature_thres_low"] | DEFAULT_THRES_LOW;
|
||||
int newThresHigh = root["temperature_thres_high"] | DEFAULT_THRES_HIGH;
|
||||
int newOneWireGPIO = root["oneWire_gpio"] | DEFAULT_ONEWIRE_GPIO;
|
||||
/*
|
||||
Serial.println(" ** Fan update [status:" + (String)newFanState + "|gpio:" + (String)newFanPwmGPIO + "|mxspd:" + (String)newMaxSpeed + "|low:" + (String)newThresLow + "|high:" + (String)newThresHigh + "]");
|
||||
*/
|
||||
if ( fanState.fanStatus != newFanState
|
||||
|| fanState.fanPwmGPIO != newFanPwmGPIO
|
||||
|| fanState.fanTachGPIO != newFanTachGPIO
|
||||
@@ -100,7 +102,10 @@ class FanState {
|
||||
}
|
||||
|
||||
static void haRead(FanState& settings, JsonObject& root) {
|
||||
root["state"] = settings.fanStatus ? ON_STATE : OFF_STATE;
|
||||
root["state"] = settings.fanStatus ? ON_STATE : OFF_STATE;
|
||||
root["Tinput"] = settings.sensorInTemp;
|
||||
root["Toutput"] = settings.sensorOutTemp;
|
||||
root["RPM"] = settings.fanSpeed;
|
||||
String s = root["state"];
|
||||
Serial.println(" ** Fan haRead [" + s + "]");
|
||||
}
|
||||
@@ -132,7 +137,8 @@ class FanStateService : public StatefulService<FanState> {
|
||||
float Tout;
|
||||
OneWire oneWire1;
|
||||
DallasTemperature sensor_intake;
|
||||
unsigned int RPM;
|
||||
float RPM;
|
||||
unsigned int ROT;
|
||||
|
||||
|
||||
FanStateService(AsyncWebServer* server, FS* fs, SecurityManager* securityManager, AsyncMqttClient* mqttClient, FanMqttSettingsService* fanMQTTSettingsService);
|
||||
|
||||
Reference in New Issue
Block a user