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
@ -99,7 +99,7 @@ void BMPX8X::writeReg(uint8_t reg, uint8_t val)
|
||||
+ ": bmpx8x_write_reg() failed");
|
||||
}
|
||||
|
||||
int BMPX8X::getPressure()
|
||||
float BMPX8X::getPressure()
|
||||
{
|
||||
return bmpx8x_get_pressure(m_bmpx8x);
|
||||
}
|
||||
|
@ -32,8 +32,7 @@
|
||||
|
||||
#include "bmpx8x.h"
|
||||
|
||||
#include "interfaces/iPressureSensor.hpp"
|
||||
#include "interfaces/iTemperatureSensor.hpp"
|
||||
#include <interfaces/iPressure.hpp>
|
||||
|
||||
namespace upm {
|
||||
|
||||
@ -68,7 +67,7 @@ namespace upm {
|
||||
* @snippet bmpx8x.cxx Interesting
|
||||
*/
|
||||
|
||||
class BMPX8X : public IPressureSensor, public ITemperatureSensor {
|
||||
class BMPX8X : virtual public iPressure {
|
||||
public:
|
||||
/**
|
||||
* Instantiates a BMPX8X object
|
||||
@ -132,7 +131,7 @@ namespace upm {
|
||||
*
|
||||
* @returns The pressure in Pascals.
|
||||
*/
|
||||
int getPressure();
|
||||
virtual float getPressure();
|
||||
|
||||
/**
|
||||
* Returns the calculated temperature in Celsius. update()
|
||||
|
@ -2,19 +2,12 @@
|
||||
|
||||
/* BEGIN Java syntax ------------------------------------------------------- */
|
||||
#ifdef SWIGJAVA
|
||||
%import "../interfaces/javaupm_iPressureSensor.i"
|
||||
%typemap(javaimports) SWIGTYPE %{import upm_interfaces.*;%}
|
||||
%import "../interfaces/javaupm_iTemperatureSensor.i"
|
||||
|
||||
JAVA_JNI_LOADLIBRARY(javaupm_bmpx8x)
|
||||
#endif
|
||||
/* END Java syntax */
|
||||
|
||||
/* BEGIN Python syntax ----------------------------------------------------- */
|
||||
#ifdef SWIGPYTHON
|
||||
%include "iModuleStatus.hpp"
|
||||
%include "iTemperatureSensor.hpp"
|
||||
%include "iPressureSensor.hpp"
|
||||
#endif
|
||||
/* END Python syntax */
|
||||
|
||||
|
Reference in New Issue
Block a user