|
ESPHome 2026.11.0-dev
|
Data Structures | |
| struct | VendorCurve |
| Per-gas constants of the vendor model. More... | |
Functions | |
| float | air_value_from_voltage (float voltage, float vcc) |
| x = VCC - V_ao: 0 at VCC (a saturated sensor, never clean air). | |
| bool | calibration_is_stable (float min_value, float max_value, float mean) |
| True when the clean-air samples spread at most MAX_CALIBRATION_SPREAD of their mean. | |
| float | ratio_from_air_value (float x, float x_air) |
| ratio = x / x_air (NaN when either value is unusable). | |
| float | ppm_from_vendor_curve (float ratio, const VendorCurve &curve) |
| ratio -> ppm as DFRobot_MICS getGasData(): 0 above the threshold or below the vendor range, the top of the range at ratio 0 (a saturated sensor), NaN stays NaN. | |
Variables | |
| constexpr float | MAX_CALIBRATION_SPREAD = 0.25f |
| Largest relative spread (max - min) / mean a clean-air calibration accepts. | |
|
inline |
x = VCC - V_ao: 0 at VCC (a saturated sensor, never clean air).
NaN at or below 0 V (a disconnected pin) and above VCC, which only a wrong vcc or voltage_multiplier produces.
Definition at line 20 of file mics_math.h.
|
inline |
True when the clean-air samples spread at most MAX_CALIBRATION_SPREAD of their mean.
Definition at line 30 of file mics_math.h.
|
inline |
ratio -> ppm as DFRobot_MICS getGasData(): 0 above the threshold or below the vendor range, the top of the range at ratio 0 (a saturated sensor), NaN stays NaN.
Definition at line 45 of file mics_math.h.
|
inline |
ratio = x / x_air (NaN when either value is unusable).
Definition at line 37 of file mics_math.h.
|
inlineconstexpr |
Largest relative spread (max - min) / mean a clean-air calibration accepts.
Definition at line 27 of file mics_math.h.