Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed CANBuffer Watchdog MODSERIAL mbed-rtos xbeeRelay IAP
Fork of SystemManagement by
Libs/Temperature/Temperature.h@30:91af74a299e1, 2014-11-13 (annotated)
- Committer:
- pspatel321
- Date:
- Thu Nov 13 10:53:10 2014 +0000
- Revision:
- 30:91af74a299e1
Parth's edits for the week.; DC-DC completed and fixed, IMD updated, LatchMonitor and Temperature added. Serial dashboard updated. File structure changed Everything tested. Compiles and runs.; Still need to write CAN in/out interface.
Who changed what in which revision?
| User | Revision | Line number | New 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 |
