mirror of
https://github.com/eclipse/upm.git
synced 2025-07-06 11:51:10 +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
@ -112,6 +112,11 @@ float TEAMS::getTemperature(bool fahrenheit)
|
||||
return m_temperature;
|
||||
}
|
||||
|
||||
float TEAMS::getTemperature()
|
||||
{
|
||||
return getTemperature(false);
|
||||
}
|
||||
|
||||
int TEAMS::average(int samples)
|
||||
{
|
||||
if (samples <= 0)
|
||||
|
@ -27,6 +27,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include <mraa/aio.hpp>
|
||||
#include <interfaces/iTemperature.hpp>
|
||||
|
||||
// Unlikey to be changable
|
||||
#define TEAMS_DEFAULT_AREF 5.0
|
||||
@ -66,7 +67,7 @@ namespace upm {
|
||||
* @snippet teams.cxx Interesting
|
||||
*/
|
||||
|
||||
class TEAMS {
|
||||
class TEAMS : virtual public iTemperature {
|
||||
public:
|
||||
|
||||
/**
|
||||
@ -104,7 +105,15 @@ namespace upm {
|
||||
* The default is false (degrees Celsius).
|
||||
* @return The last temperature reading in Celsius or Fahrenheit
|
||||
*/
|
||||
float getTemperature(bool fahrenheit=false);
|
||||
float getTemperature(bool fahrenheit);
|
||||
|
||||
/**
|
||||
* Get the current temperature. update() must have been called
|
||||
* prior to calling this method.
|
||||
*
|
||||
* @return The last temperature reading in Celsius or Fahrenheit
|
||||
*/
|
||||
virtual float getTemperature();
|
||||
|
||||
/**
|
||||
* When using a direct 4-20ma interface (rResistor supplied in the
|
||||
|
Reference in New Issue
Block a user