|
Aquarium Cooling Controller
ESP32 firmware for aquarium cooling fan control, monitoring, telemetry, and fault handling.
|
Fan characterization table and interpolation helpers. More...
Functions | |
| size_t | pointCount () |
| Returns the number of measured fan-curve points. | |
| const FanCurvePoint * | points () |
| Returns the measured fan-curve table. | |
| uint16_t | expectedRpmForPwm (uint8_t pwmPercent) |
| Interpolates the expected RPM for a PWM command. | |
| uint16_t | rpmToleranceForExpected (uint16_t expectedRpm) |
| Calculates the tolerated RPM deviation for an expected speed. | |
| bool | isPlausibilityRegion (uint8_t pwmPercent) |
| Checks whether a PWM command is high enough for RPM plausibility checks. | |
Fan characterization table and interpolation helpers.
The namespace exposes read-only access to measured curve points and helper functions for converting PWM commands into expected RPM and allowed tolerance.
| uint16_t FanCurve::expectedRpmForPwm | ( | uint8_t | pwmPercent | ) |
Interpolates the expected RPM for a PWM command.
Values between measured points are linearly interpolated and rounded to the nearest integer RPM. Values outside the curve range are clamped to the nearest measured endpoint.
| pwmPercent | Fan PWM command in percent. |
| bool FanCurve::isPlausibilityRegion | ( | uint8_t | pwmPercent | ) |
Checks whether a PWM command is high enough for RPM plausibility checks.
| pwmPercent | Fan PWM command in percent. |
| size_t FanCurve::pointCount | ( | ) |
Returns the number of measured fan-curve points.
| const FanCurvePoint * FanCurve::points | ( | ) |
Returns the measured fan-curve table.
| uint16_t FanCurve::rpmToleranceForExpected | ( | uint16_t | expectedRpm | ) |
Calculates the tolerated RPM deviation for an expected speed.
| expectedRpm | Expected fan speed in RPM. |