mirror of
https://github.com/eclipse/upm.git
synced 2025-07-27 14:11:15 +03:00
Added initial interfaces and some sensors implementing them
Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:

committed by
Mihai Tudor Panu

parent
6bf21a23e7
commit
f035470822
@ -55,6 +55,11 @@ float OTP538U::ambientTemperature()
|
||||
return temp;
|
||||
}
|
||||
|
||||
float OTP538U::getTemperature()
|
||||
{
|
||||
return ambientTemperature();
|
||||
}
|
||||
|
||||
float OTP538U::objectTemperature()
|
||||
{
|
||||
float temp = 0;
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <otp538u.h>
|
||||
#include <interfaces/iTemperature.hpp>
|
||||
|
||||
namespace upm {
|
||||
|
||||
@ -73,7 +74,7 @@ namespace upm {
|
||||
* @image html otp538u.jpg
|
||||
* @snippet otp538u.cxx Interesting
|
||||
*/
|
||||
class OTP538U {
|
||||
class OTP538U : virtual public iTemperature {
|
||||
public:
|
||||
/**
|
||||
* OTP538U constructor
|
||||
@ -96,6 +97,13 @@ namespace upm {
|
||||
*/
|
||||
float ambientTemperature();
|
||||
|
||||
/**
|
||||
* Gets the ambient temperature in Celsius
|
||||
*
|
||||
* @return Ambient temperature
|
||||
*/
|
||||
virtual float getTemperature();
|
||||
|
||||
/**
|
||||
* Gets the object temperature in Celsius
|
||||
*
|
||||
|
Reference in New Issue
Block a user