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: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: measurement/Temperature.h
- Revision:
- 124:311fa85af2b3
- Parent:
- 101:dbcd3bc51758
- Child:
- 137:a52821cdb108
--- a/measurement/Temperature.h Wed May 27 09:22:24 2015 +0000
+++ b/measurement/Temperature.h Fri May 29 12:05:01 2015 +0000
@@ -8,8 +8,9 @@
class Temperature: public AbstractReporter
{
public:
- Temperature(): deviceReady(false), oldValue(0), sensor(D14, D15) {
- t_start = time(NULL);
+ Temperature(): deviceReady(false), oldValue(0),
+ timer(), sensor(D14, D15) {
+ timer.start();
}
virtual ~Temperature() {}
virtual bool init() {
@@ -21,7 +22,7 @@
private:
bool deviceReady;
float oldValue;
- time_t t_start;
+ Timer timer;
LM75B sensor;
};

Cumulocity