22#ifndef _TemperatureSensor_H_
23#define _TemperatureSensor_H_
28#if defined(CONF_DSENSOR)
75 return 93.8136 - 0.122241 *
static_cast<float>(
get() >> 6);
83 float F()
const {
return C() * 1.8 + 32;}
90 int tenths()
const {
return static_cast<int>(
C() * 10.);}
97 int degrees()
const {
return static_cast<int>(
C());}
101#warning Enable CONF_DSENSOR to use TemperatureSensor.H
C++ Sensor Class Interface.
unsigned int get() const
Get the current sensor reading.
Port
List of sensor identifiers (IDs).
Temperature-sensor interface.
float C() const
Get the current temperature in Celsius.
~TemperatureSensor()
Destroy this instance of TemperatureSensor.
int degrees() const
Get the current temperature in C, as an int.
int tenths() const
Get the current temperature in C * 10, as an int.
TemperatureSensor(const Sensor::Port port)
Construct a temperature sensor.
float F() const
Get the current temperature in F.
kernel configuration file