Added initial interfaces and some sensors implementing them

Signed-off-by: Mihai Tudor Panu <mihai.tudor.panu@intel.com>
This commit is contained in:
Mihai Stefanescu
2018-06-12 18:46:49 +03:00
committed by Mihai Tudor Panu
parent 6bf21a23e7
commit f035470822
102 changed files with 1183 additions and 182 deletions

View File

@ -77,7 +77,7 @@ float MS5803::getTemperature()
float MS5803::getPressure()
{
return ms5803_get_pressure(m_ms5803);
return (ms5803_get_pressure(m_ms5803) * 100);
}
void MS5803::loadCoefficients()

View File

@ -24,6 +24,8 @@
#pragma once
#include <string>
#include <interfaces/iPressure.hpp>
#include <interfaces/iTemperature.hpp>
#include "ms5803.h"
@ -64,7 +66,7 @@ namespace upm {
*
* @snippet ms5803.cxx Interesting
*/
class MS5803 {
class MS5803 : virtual public iPressure, virtual public iTemperature {
public:
/**
@ -130,7 +132,7 @@ namespace upm {
*
* @return Temperature in degrees C
*/
float getTemperature();
virtual float getTemperature();
/**
* Return the latest measured pressure. update() must have
@ -139,7 +141,7 @@ namespace upm {
*
* @return Pressure in mbar
*/
float getPressure();
virtual float getPressure();
protected:
ms5803_context m_ms5803;