30#if TEMP_SENSOR_PRESENT
60 MockOneWire() =
default;
62 void begin(uint8_t) {}
71 void select(
const uint8_t*) {}
73 void write(uint8_t) {}
80 uint8_t crc8(
const uint8_t*, uint8_t)
236 for (
auto& buf_elem : buf)
245 if (
oneWire.crc8(buf, 8) != buf[8])
252 int16_t result = (buf[1] << 8) | buf[0];
253 result = (result * 6) + (result >> 2);
void requestTemperatures() const
Request temperature conversion for all sensors.
constexpr TemperatureSensing()=delete
constexpr TemperatureSensing(uint8_t pin, const DeviceAddress(&ref)[N])
Construct a new Temperature Sensing object.
const DeviceAddress sensorAddrs[N]
constexpr auto get_size() const
Get the number of sensors.
void initTemperatureSensors() const
Initialize the Dallas temperature sensors.
int16_t readTemperature(const uint8_t idx) const
Reads the temperature of a specific sensor.
static conditional< TEMP_SENSOR_PRESENT, OneWire, MockOneWire >::type oneWire
constexpr auto get_pin() const
Get the pin of the sensor(s).
Configuration values to be set by the end-user.
constexpr bool TEMP_SENSOR_PRESENT
constexpr uint8_t CONVERT_TEMPERATURE
constexpr int16_t DEVICE_DISCONNECTED_RAW
constexpr uint8_t READ_SCRATCHPAD
constexpr int16_t OUTOFRANGE_TEMPERATURE
constexpr int16_t TEMP_RANGE_HIGH
uint8_t[9] ScratchPad
Represents a buffer for storing sensor data.
Structure representing the address of a device.
constexpr uint8_t unused_pin