3-phase PV router
Loading...
Searching...
No Matches
DS18B20::PowerOnFilter Struct Reference

The readings of one sensor, the power-on value skipped. More...

#include <ds18b20.h>

Public Member Functions

int16_t operator() (const int16_t reading)
 The reading to keep.
 

Public Attributes

int16_t lastValid { 0 }
 

Detailed Description

The readings of one sensor, the power-on value skipped.

Compares each 85.00 °C with the last valid reading: an invalid reading in between (a CRC error) leaves it as it was. Compared with the reading kept last time, a steady 85.00 °C would be dropped for good after a single CRC error. At startup, the reference is 0, so a first reading of 85.00 °C is skipped.

Definition at line 161 of file ds18b20.h.

Member Function Documentation

◆ operator()()

int16_t DS18B20::PowerOnFilter::operator() ( const int16_t reading)
inline

The reading to keep.

Parameters
readingThe reading of the sensor
Returns
reading, or DEVICE_DISCONNECTED_RAW for the power-on value

Definition at line 171 of file ds18b20.h.

Here is the call graph for this function:

Member Data Documentation

◆ lastValid

int16_t DS18B20::PowerOnFilter::lastValid { 0 }

the last valid reading, in hundredths of °C

Definition at line 163 of file ds18b20.h.


The documentation for this struct was generated from the following file: