Self test boot program for testing icarus sensors

Dependencies:   BLE_API mbed nRF51822

Fork of BLE_UARTConsole by Bluetooth Low Energy

Revision:
13:ef0ce8fa871f
Parent:
10:3a24c970db40
Child:
14:cb369746225d
--- a/BaseSensor.h	Tue Mar 03 20:00:21 2015 +0000
+++ b/BaseSensor.h	Sun Apr 05 09:54:04 2015 +0000
@@ -3,6 +3,8 @@
  
 #include "mbed.h"
 
+#define LOG(...)  do { if (debug) { debug( __VA_ARGS__); } } while (0)
+
 /* Constants */
 #define SENSORS_GRAVITY_EARTH             (9.80665F)              /**< Earth's gravity in m/s^2 */
 #define SENSORS_GRAVITY_MOON              (1.6F)                  /**< The moon's gravity in m/s^2 */
@@ -61,14 +63,15 @@
 class BaseSensor {
 public:
 //constructor
-    BaseSensor();
+    BaseSensor(void (*debug_)(const char* format, ...)=0);
     //get sensor details from actual implementation
     virtual char* getSimpleName() = 0;
     virtual void getSensorDetails(sensor_t*) = 0;
     //verify basic integrity of underlining hardware
     virtual uint32_t verifyIntegrity(uint32_t*) = 0;  
-    
+    void (*debug)(const char* format, ...);  
 private:  
+
 };
  
 #endif
\ No newline at end of file