Jens Schneider / BME280
Revision:
3:b3835216cc88
Parent:
2:4ed2f08d0eff
Child:
4:db58c1198a04
--- a/BME280.cpp	Sat Nov 07 12:23:29 2015 +0000
+++ b/BME280.cpp	Sat Nov 07 21:28:40 2015 +0000
@@ -45,7 +45,7 @@
 const uint8_t BME280::STATUS_UPDATING       = 0x01;
 const uint8_t BME280::STATUS_ERROR          = 0xFF;
 
-extern Serial ser;
+const std::string BME280::m_name = std::string("Bosch BME280");
 
 BME280::BME280(void) : m_pI2C(NULL), m_address(0x00), m_fine_temp(0x1F3E6), m_mode(MODE_SLEEP),m_bOk(false) {
     // initialized m_fine_temp to 25C
@@ -67,6 +67,10 @@
     return true;
 }
 
+const bool& BME280::is_ok(void) const {
+    return m_bOk;
+}
+
 bool BME280::done(void) {
     stop();
     m_pI2C = NULL;
@@ -139,6 +143,10 @@
     return true;
 }
 
+const std::string& BME280::name(void) const {
+    return m_name;
+}
+
 bool BME280::raw_data(int32_t& rawT, int32_t& rawP, int32_t& rawH) {
     if (m_pI2C==NULL) return false;
     uint8_t data[8];