Aquarium Cooling Controller
ESP32 firmware for aquarium cooling fan control, monitoring, telemetry, and fault handling.
Loading...
Searching...
No Matches
Namespaces | Functions
control_engine.cpp File Reference

Implements temperature-based cooling PWM calculations. More...

#include "control_engine.h"
#include <math.h>
Include dependency graph for control_engine.cpp:

Namespaces

namespace  ControlEngine
 Pure cooling-control calculations.
 

Functions

bool ControlEngine::isTargetTemperatureValid (float targetTemperatureC, const ControlConfig &config=kDefaultControlConfig)
 Checks whether a target temperature is finite and inside configured limits.
 
bool ControlEngine::isControlConfigValid (const ControlConfig &config)
 Checks whether a full staged-control configuration is internally valid.
 
float ControlEngine::sanitizeTargetTemperature (float targetTemperatureC, const ControlConfig &config=kDefaultControlConfig)
 Replaces invalid target temperatures with the configured default.
 
ControlSnapshot ControlEngine::compute (const ControlInputs &inputs, const ControlConfig &config=kDefaultControlConfig)
 Computes the fan command and control mode for the current inputs.
 
const char * ControlEngine::modeLabel (ControlMode mode)
 Converts a control mode to a stable diagnostic label.
 

Detailed Description

Implements temperature-based cooling PWM calculations.