From 934d57196487a49b18d9f35b91b006a99b35f177 Mon Sep 17 00:00:00 2001 From: Mihai Tudor Panu Date: Thu, 4 Apr 2019 22:06:21 -0700 Subject: [PATCH] bmpx8x: library implements new iTemperature interface Signed-off-by: Mihai Tudor Panu --- src/bmpx8x/CMakeLists.txt | 2 +- src/bmpx8x/bmpx8x.hpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/bmpx8x/CMakeLists.txt b/src/bmpx8x/CMakeLists.txt index b8834fbf..83105e9d 100644 --- a/src/bmpx8x/CMakeLists.txt +++ b/src/bmpx8x/CMakeLists.txt @@ -4,7 +4,7 @@ upm_mixed_module_init (NAME bmpx8x C_SRC bmpx8x.c CPP_HDR bmpx8x.hpp CPP_SRC bmpx8x.cxx - IFACE_HDR iPressure.hpp + IFACE_HDR iPressure.hpp iTemperature.hpp FTI_SRC bmpx8x_fti.c CPP_WRAPS_C REQUIRES mraa utilities-c) diff --git a/src/bmpx8x/bmpx8x.hpp b/src/bmpx8x/bmpx8x.hpp index 4657bb07..18a332ba 100644 --- a/src/bmpx8x/bmpx8x.hpp +++ b/src/bmpx8x/bmpx8x.hpp @@ -34,6 +34,7 @@ #include "mraa/initio.hpp" #include +#include namespace upm { @@ -68,7 +69,7 @@ namespace upm { * @snippet bmpx8x.cxx Interesting */ - class BMPX8X : virtual public iPressure { + class BMPX8X : virtual public iPressure, virtual public iTemperature { public: /** * Instantiates a BMPX8X object @@ -147,7 +148,7 @@ namespace upm { * * @returns The temperature in Celsius. */ - float getTemperature(); + virtual float getTemperature(); /** * Using the supplied altitude in meters, compute the pressure