Skip to content

Commit 934d571

Browse files
committed
bmpx8x: library implements new iTemperature interface
Signed-off-by: Mihai Tudor Panu <[email protected]>
1 parent ef92026 commit 934d571

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/bmpx8x/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ upm_mixed_module_init (NAME bmpx8x
44
C_SRC bmpx8x.c
55
CPP_HDR bmpx8x.hpp
66
CPP_SRC bmpx8x.cxx
7-
IFACE_HDR iPressure.hpp
7+
IFACE_HDR iPressure.hpp iTemperature.hpp
88
FTI_SRC bmpx8x_fti.c
99
CPP_WRAPS_C
1010
REQUIRES mraa utilities-c)

src/bmpx8x/bmpx8x.hpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434

3535
#include "mraa/initio.hpp"
3636
#include <interfaces/iPressure.hpp>
37+
#include <interfaces/iTemperature.hpp>
3738

3839
namespace upm {
3940

@@ -68,7 +69,7 @@ namespace upm {
6869
* @snippet bmpx8x.cxx Interesting
6970
*/
7071

71-
class BMPX8X : virtual public iPressure {
72+
class BMPX8X : virtual public iPressure, virtual public iTemperature {
7273
public:
7374
/**
7475
* Instantiates a BMPX8X object
@@ -147,7 +148,7 @@ namespace upm {
147148
*
148149
* @returns The temperature in Celsius.
149150
*/
150-
float getTemperature();
151+
virtual float getTemperature();
151152

152153
/**
153154
* Using the supplied altitude in meters, compute the pressure

0 commit comments

Comments
 (0)