Penn Electric Racing / Mbed 2 deprecated SystemManagement

Dependencies:   mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP

Fork of SystemManagement by Martin Deng

Committer:
pspatel321
Date:
Wed Feb 11 23:09:57 2015 +0000
Revision:
39:ddf38df9699e
Parent:
30:91af74a299e1
Updated CAN IDs for datalogging.  Changed profile encoding.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
pspatel321 30:91af74a299e1 1 #ifndef __TEMPERATURE_H
pspatel321 30:91af74a299e1 2 #define __TEMPERATURE_H
pspatel321 30:91af74a299e1 3
pspatel321 30:91af74a299e1 4 #include "mbed.h"
pspatel321 30:91af74a299e1 5
pspatel321 30:91af74a299e1 6 typedef struct LOOKUP_TABLE_T {
pspatel321 30:91af74a299e1 7 float *input;
pspatel321 30:91af74a299e1 8 float *output;
pspatel321 30:91af74a299e1 9 int numEntries;
pspatel321 30:91af74a299e1 10 } LOOKUP_TABLE_T;
pspatel321 30:91af74a299e1 11
pspatel321 30:91af74a299e1 12 extern LOOKUP_TABLE_T NXFT15XH103_TABLE;
pspatel321 30:91af74a299e1 13
pspatel321 30:91af74a299e1 14 class Temperature {
pspatel321 30:91af74a299e1 15 public:
pspatel321 30:91af74a299e1 16 Temperature(LOOKUP_TABLE_T *_table, PinName _pin);
pspatel321 30:91af74a299e1 17 float readRaw();
pspatel321 30:91af74a299e1 18 float read();
pspatel321 30:91af74a299e1 19 #ifdef MBED_OPERATORS
pspatel321 30:91af74a299e1 20 operator float() {
pspatel321 30:91af74a299e1 21 return read();
pspatel321 30:91af74a299e1 22 }
pspatel321 30:91af74a299e1 23 #endif
pspatel321 30:91af74a299e1 24 private:
pspatel321 30:91af74a299e1 25 float convert(float reading);
pspatel321 30:91af74a299e1 26 LOOKUP_TABLE_T *table;
pspatel321 30:91af74a299e1 27 AnalogIn pin;
pspatel321 30:91af74a299e1 28 };
pspatel321 30:91af74a299e1 29
pspatel321 30:91af74a299e1 30 #endif