Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Revision:
30:91af74a299e1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Libs/Temperature/Temperature.h	Thu Nov 13 10:53:10 2014 +0000
@@ -0,0 +1,30 @@
+#ifndef __TEMPERATURE_H
+#define __TEMPERATURE_H
+
+#include "mbed.h"
+
+typedef struct LOOKUP_TABLE_T {
+    float *input;    
+    float *output;
+    int numEntries;
+} LOOKUP_TABLE_T;
+
+extern LOOKUP_TABLE_T NXFT15XH103_TABLE;
+
+class Temperature {
+public:
+    Temperature(LOOKUP_TABLE_T *_table, PinName _pin);
+    float readRaw();
+    float read();
+#ifdef MBED_OPERATORS
+    operator float() {
+        return read();
+    }
+#endif
+private:
+    float convert(float reading);
+    LOOKUP_TABLE_T *table;
+    AnalogIn pin;
+};
+
+#endif
\ No newline at end of file