|
3-phase PV router
|
Classes | |
| struct | PowerOnFilter |
| The readings of one sensor, the power-on value skipped. More... | |
Typedefs | |
| using | ScratchPad = uint8_t[9] |
| The scratchpad: temperature LSB and MSB, TH, TL, configuration, 3 reserved bytes, CRC. | |
Functions | |
| constexpr uint8_t | crc8 (const uint8_t *data, uint8_t len) |
| The Dallas/Maxim CRC-8 (x^8 + x^5 + x^4 + 1), as OneWire::crc8. | |
| constexpr int16_t | decode (const ScratchPad &buf) |
| The reading of a scratchpad, its CRC checked. | |
| constexpr int16_t | skipPowerOnValue (int16_t reading, int16_t previous) |
| The reading to keep, the power-on value skipped. | |
| constexpr int16_t | toHundredths (uint8_t lsb, uint8_t msb) |
| The temperature of the register, in hundredths of °C. | |
Variables | |
| constexpr int16_t | POWER_ON_JUMP { 500 } |
| constexpr int16_t | POWER_ON_VALUE { 8500 } |
| using DS18B20::ScratchPad = uint8_t[9] |
|
constexpr |
The Dallas/Maxim CRC-8 (x^8 + x^5 + x^4 + 1), as OneWire::crc8.
Bit by bit, as the OneWire library without its table (ONEWIRE_CRC8_TABLE 0): its 32-byte table is not worth it for one scratchpad a second. The firmware's own copy, so the native tests check the CRC the firmware runs.
| data | The bytes |
| len | Their number |
Definition at line 59 of file ds18b20.h.

|
constexpr |
The reading of a scratchpad, its CRC checked.
| buf | The 9 bytes read from the sensor |
DEVICE_DISCONNECTED_RAW on a CRC error, OUTOFRANGE_TEMPERATURE below -55.00 °C or above +125.00 °C. Definition at line 101 of file ds18b20.h.


|
constexpr |
The reading to keep, the power-on value skipped.
A sensor that has just been powered (plugged, or a power glitch) answers 85.00 °C before its first conversion. 85.00 °C more than 5.00 °C away from the previous reading is that value, not a temperature.
| reading | The reading of the sensor |
| previous | The last valid reading (PowerOnFilter keeps it) |
reading, or DEVICE_DISCONNECTED_RAW for the power-on value Definition at line 127 of file ds18b20.h.

|
constexpr |
The temperature of the register, in hundredths of °C.
The register is the temperature x16 (1/16 °C at 12 bits), two's complement. x6.25 = x6 + x/4, rounded down (towards -infinity): 1/16 °C gives 6, -1/16 °C -7.
| lsb | Byte 0 of the scratchpad |
| msb | Byte 1 of the scratchpad |
Definition at line 88 of file ds18b20.h.

|
inlineconstexpr |