3-phase PV router
Loading...
Searching...
No Matches
utils_temp.h File Reference

Provides utilities for managing temperature sensors. More...

#include <Arduino.h>
#include "constants.h"
#include "config.h"
#include "debug.h"
#include "ds18b20.h"
#include "onewire_search.h"
#include <OneWire.h>
Include dependency graph for utils_temp.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TempSensors< N >
 Implements temperature sensing functionality for multiple sensors. More...
 

Typedefs

using OneWireType = conditional_t< TEMP_SENSOR_PRESENT, OneWire, MockOneWire >
 

Functions

template<uint8_t N>
 TempSensors (const TemperatureSensing< N > &) -> TempSensors< N >
 Deduction guide: N from the sensors of config.h.
 

Detailed Description

Provides utilities for managing temperature sensors.

Author
Frédéric Metrich (frede.nosp@m.ric..nosp@m.metri.nosp@m.ch@l.nosp@m.ive.f.nosp@m.r)

This file defines the TempSensors class, which handles temperature sensing using DS18B20 sensors, from the TemperatureSensing of config.h. It includes functions for initializing sensors, reading temperatures, and managing sensor addresses.

  • Sensor Initialization: Initializes the OneWire bus.
  • Temperature Reading: The conversion, then each sensor's read in three transactions, one per mains cycle (temp_schedule.h): its scratchpad is validated by DS18B20::decode().
  • Error Handling: Handles disconnected or out-of-range sensors.
Version
0.1
Date
2026-11-23

Definition in file utils_temp.h.

Typedef Documentation

◆ OneWireType

using OneWireType = conditional_t< TEMP_SENSOR_PRESENT, OneWire, MockOneWire >

Definition at line 74 of file utils_temp.h.

Function Documentation

◆ TempSensors()

template<uint8_t N>
TempSensors ( const TemperatureSensing< N > & ) -> TempSensors< N >

Deduction guide: N from the sensors of config.h.