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/Acceleration.h
- Revision:
- 124:311fa85af2b3
- Parent:
- 101:dbcd3bc51758
- Child:
- 137:a52821cdb108
--- a/measurement/Acceleration.h Wed May 27 09:22:24 2015 +0000
+++ b/measurement/Acceleration.h Fri May 29 12:05:01 2015 +0000
@@ -8,11 +8,11 @@
class Acceleration: public AbstractReporter
{
public:
- Acceleration(): deviceReady(false), sensor(SDA, SCL) {
+ Acceleration(): deviceReady(false), sensor(SDA, SCL), timer() {
oldValues[0] = 0;
oldValues[1] = 0;
oldValues[2] = 0;
- t_start = time(NULL);
+ timer.start();
}
virtual ~Acceleration() {}
virtual bool init() {
@@ -25,7 +25,7 @@
bool deviceReady;
MMA7660 sensor;
float oldValues[3];
- time_t t_start;
+ Timer timer;
};
#endif /* ACCELERATION_H */
\ No newline at end of file

Cumulocity