mirror of
https://github.com/eclipse/upm.git
synced 2025-07-02 01:41:12 +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
@ -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()
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user