control loop refinement
This commit is contained in:
parent
fbf038eaaf
commit
079b4e4972
@ -75,20 +75,22 @@ void taskControl(void *pvParameters)
|
|||||||
sControlTemperatureEntry currentControlEntry = getCurrentTemperatureEntry();
|
sControlTemperatureEntry currentControlEntry = getCurrentTemperatureEntry();
|
||||||
ESP_LOGI(TAG, "Control Entry Hour: %i Minute: %i ChamberTemp: %lf ReturnFlowTemp: %lf", currentControlEntry.timestamp.hour, currentControlEntry.timestamp.minute, currentControlEntry.fChamberTemperature, currentControlEntry.fReturnFlowTemperature);
|
ESP_LOGI(TAG, "Control Entry Hour: %i Minute: %i ChamberTemp: %lf ReturnFlowTemp: %lf", currentControlEntry.timestamp.hour, currentControlEntry.timestamp.minute, currentControlEntry.fChamberTemperature, currentControlEntry.fReturnFlowTemperature);
|
||||||
|
|
||||||
if (getChamberTemperature().fCurrentValue >= currentControlEntry.fChamberTemperature)
|
if (bHeatingInAction == true)
|
||||||
{
|
{
|
||||||
bHeatingInAction = false;
|
if (getChamberTemperature().fCurrentValue >= currentControlEntry.fChamberTemperature)
|
||||||
setCirculationPumpState(ENABLED);
|
|
||||||
setBurnerState(DISABLED);
|
|
||||||
setSafetyControlState(ENABLED);
|
|
||||||
ESP_LOGI(TAG, "Chamber Target Temperature reached!");
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (bHeatingInAction)
|
|
||||||
{
|
{
|
||||||
// TODO: Check burner fault signal here
|
ESP_LOGI(TAG, "Chamber Target Temperature reached: Disable burner");
|
||||||
|
bHeatingInAction = false;
|
||||||
|
setCirculationPumpState(ENABLED);
|
||||||
|
setBurnerState(DISABLED);
|
||||||
|
setSafetyControlState(ENABLED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (bHeatingInAction)
|
||||||
|
{
|
||||||
|
// TODO: Check burner fault signal here
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,6 +98,7 @@ void taskControl(void *pvParameters)
|
|||||||
{
|
{
|
||||||
if (getReturnFlowTemperature().average60s.fValue <= currentControlEntry.fReturnFlowTemperature)
|
if (getReturnFlowTemperature().average60s.fValue <= currentControlEntry.fReturnFlowTemperature)
|
||||||
{
|
{
|
||||||
|
ESP_LOGI(TAG, "Return Flow Target Temperature reached: Enable Burner");
|
||||||
bHeatingInAction = true;
|
bHeatingInAction = true;
|
||||||
setCirculationPumpState(ENABLED);
|
setCirculationPumpState(ENABLED);
|
||||||
setBurnerState(ENABLED);
|
setBurnerState(ENABLED);
|
||||||
|
Loading…
Reference in New Issue
Block a user