add prediction to all temps

This commit is contained in:
Hendrik Schutter 2024-12-26 18:54:50 +01:00
parent 1564860213
commit 856f009e7f
2 changed files with 24 additions and 3 deletions

View File

@ -234,15 +234,18 @@ void taskInput(void *pvParameters)
sOutdoorTemperature.fCurrentValue = temp_c;
sOutdoorTemperature.state = MEASUREMENT_NO_ERROR;
// updateAverage(&sOutdoorTemperature);
updateAverage(&sOutdoorTemperature);
updatePrediction(&sOutdoorTemperature);
sInletFlowTemperature.fCurrentValue = temp_c;
sInletFlowTemperature.state = MEASUREMENT_NO_ERROR;
// updateAverage(&sInletFlowTemperature);
updateAverage(&sInletFlowTemperature);
updatePrediction(&sInletFlowTemperature);
sReturnFlowTemperature.fCurrentValue = temp_c;
sReturnFlowTemperature.state = MEASUREMENT_NO_ERROR;
// updateAverage(&sReturnFlowTemperature);
updateAverage(&sReturnFlowTemperature);
updatePrediction(&sReturnFlowTemperature);
break;
default:
break;

View File

@ -152,6 +152,12 @@ void taskMetrics(void *pvParameters)
aMetrics[u16MetricCounter].fMetricValue = getInletFlowTemperature().average60s.fValue;
u16MetricCounter++;
// Inlet Flow Temperature Predict 60s
strcpy(aMetrics[u16MetricCounter].caMetricName, "inlet_flow_temperature_pred60");
aMetrics[u16MetricCounter].type = FLOAT;
aMetrics[u16MetricCounter].fMetricValue = getInletFlowTemperature().predict60s.fValue;
u16MetricCounter++;
// Outdoor Temperature
strcpy(aMetrics[u16MetricCounter].caMetricName, "outdoor_temperature");
aMetrics[u16MetricCounter].type = FLOAT;
@ -170,6 +176,12 @@ void taskMetrics(void *pvParameters)
aMetrics[u16MetricCounter].fMetricValue = getOutdoorTemperature().average60s.fValue;
u16MetricCounter++;
// Outdoor Temperature Predict 60s
strcpy(aMetrics[u16MetricCounter].caMetricName, "outdoor_temperature_pred60");
aMetrics[u16MetricCounter].type = FLOAT;
aMetrics[u16MetricCounter].fMetricValue = getOutdoorTemperature().predict60s.fValue;
u16MetricCounter++;
// Return Flow Temperature
strcpy(aMetrics[u16MetricCounter].caMetricName, "return_flow_temperature");
aMetrics[u16MetricCounter].type = FLOAT;
@ -188,6 +200,12 @@ void taskMetrics(void *pvParameters)
aMetrics[u16MetricCounter].fMetricValue = getReturnFlowTemperature().average60s.fValue;
u16MetricCounter++;
// Return Flow Temperature Predict 60s
strcpy(aMetrics[u16MetricCounter].caMetricName, "return_flow_temperature_pred60");
aMetrics[u16MetricCounter].type = FLOAT;
aMetrics[u16MetricCounter].fMetricValue = getReturnFlowTemperature().predict60s.fValue;
u16MetricCounter++;
// Sensor State
sSensorSanityCheck aChecks[NUMBER_OF_SENSOR_SANITY_CHECKS];
getSensorSanityStates(aChecks);