mirror of
https://github.com/Laxilef/OTGateway.git
synced 2025-12-11 18:54:28 +05:00
refactor: some changes
This commit is contained in:
@@ -106,21 +106,15 @@ protected:
|
||||
}
|
||||
|
||||
inline float getHeatingMinSetpointTemp() {
|
||||
if (settings.opentherm.nativeHeatingControl) {
|
||||
return vars.master.heating.minTemp;
|
||||
|
||||
} else {
|
||||
return settings.heating.minTemp;
|
||||
}
|
||||
return settings.opentherm.nativeHeatingControl
|
||||
? vars.master.heating.minTemp
|
||||
: settings.heating.minTemp;
|
||||
}
|
||||
|
||||
inline float getHeatingMaxSetpointTemp() {
|
||||
if (settings.opentherm.nativeHeatingControl) {
|
||||
return vars.master.heating.maxTemp;
|
||||
|
||||
} else {
|
||||
return settings.heating.maxTemp;
|
||||
}
|
||||
return settings.opentherm.nativeHeatingControl
|
||||
? vars.master.heating.maxTemp
|
||||
: settings.heating.maxTemp;
|
||||
}
|
||||
|
||||
float getHeatingSetpointTemp() {
|
||||
|
||||
@@ -171,6 +171,10 @@ public:
|
||||
auto& rSensor = results[sensorId];
|
||||
|
||||
float compensatedValue = value;
|
||||
if (sSensor.type == Type::HEATING_SETPOINT_TEMP || sSensor.type == Type::MANUAL) {
|
||||
rSensor.values[valueId] = compensatedValue;
|
||||
|
||||
} else {
|
||||
if (valueType == ValueType::PRIMARY) {
|
||||
if (fabsf(sSensor.factor) > 0.001f) {
|
||||
compensatedValue *= sSensor.factor;
|
||||
@@ -192,6 +196,7 @@ public:
|
||||
} else {
|
||||
rSensor.values[valueId] = compensatedValue;
|
||||
}
|
||||
}
|
||||
|
||||
if (updateActivityTime) {
|
||||
rSensor.activityTime = millis();
|
||||
|
||||
Reference in New Issue
Block a user