mirror of
https://github.com/eclipse/upm.git
synced 2025-07-04 10:51:12 +03:00
Added initial interfaces and some sensors implementing them
This commit is contained in:

committed by
Serban Waltter

parent
85608a9f61
commit
e7820f2831
@ -70,6 +70,11 @@ MLX90614::readAmbientTempC(void) {
|
||||
return readTemperature(MLX90614_TA);
|
||||
}
|
||||
|
||||
float
|
||||
MLX90614::getTemperature() {
|
||||
return readAmbientTempC();
|
||||
}
|
||||
|
||||
/*
|
||||
* **************
|
||||
* private area
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <mraa/i2c.hpp>
|
||||
#include <interfaces/iTemperature.hpp>
|
||||
|
||||
#define DEVICE_ADDR 0x5A // device address
|
||||
|
||||
@ -73,7 +74,7 @@ namespace upm {
|
||||
* @image html mlx90614.jpg
|
||||
* @snippet mlx90614.cxx Interesting
|
||||
*/
|
||||
class MLX90614 {
|
||||
class MLX90614 : virtual public iTemperature {
|
||||
public:
|
||||
|
||||
/**
|
||||
@ -109,6 +110,13 @@ class MLX90614 {
|
||||
*/
|
||||
float readAmbientTempC(void);
|
||||
|
||||
/**
|
||||
* Returns the temperature in degrees Celsius
|
||||
*
|
||||
* @return The Temperature in degrees Celsius
|
||||
*/
|
||||
virtual float getTemperature();
|
||||
|
||||
/**
|
||||
* Returns the name of the component
|
||||
*/
|
||||
|
Reference in New Issue
Block a user