|
Aquarium Cooling Controller
ESP32 firmware for aquarium cooling fan control, monitoring, telemetry, and fault handling.
|
Computes cooling PWM commands from temperature inputs and policy limits. More...
#include <Arduino.h>

Go to the source code of this file.
Classes | |
| struct | ControlConfig |
| Tunable limits and hysteresis settings for cooling control. More... | |
| struct | ControlInputs |
| Sensor and target inputs for one control calculation. More... | |
| struct | ControlSnapshot |
| Complete result of one control calculation. More... | |
Namespaces | |
| namespace | ControlEngine |
| Pure cooling-control calculations. | |
Enumerations | |
| enum class | ControlMode : uint8_t { kFanOff , kFanLow , kFanHigh , kWaterSensorFallback } |
| Operating mode selected by the control engine. More... | |
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. | |
Variables | |
| constexpr ControlConfig | kDefaultControlConfig |
| Default control limits for the aquarium cooling firmware. | |
Computes cooling PWM commands from temperature inputs and policy limits.
This module is intentionally independent from sensors, networking, and PWM hardware. It turns already-sampled temperatures into a deterministic control decision that can be unit-tested without an ESP32 runtime.
|
strong |
Operating mode selected by the control engine.
The mode explains why the final PWM command was selected. It is used in diagnostics and telemetry so users can distinguish between an idle fan state, the fixed quiet cooling stage, and the water-sensor fallback mode.