30#if TEMP_SENSOR_PRESENT
58 MockOneWire() =
default;
60 void begin(uint8_t) {}
69 void select(
const uint8_t*) {}
71 void write(uint8_t) {}
78 uint8_t crc8(
const uint8_t*, uint8_t)
86#if TEMP_SENSOR_PRESENT
242 for (
auto& buf_elem : buf)
251 if (
oneWire.crc8(buf, 8) != buf[8])
258 int16_t result = (buf[1] << 8) | buf[0];
259 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.
static OneWireType oneWire
void initTemperatureSensors() const
Initialize the Dallas temperature sensors.
int16_t readTemperature(const uint8_t idx) const
Reads the temperature of a specific sensor.
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