Own fork of MbedSmartRestMain

Dependencies:   C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed

Fork of MbedSmartRestMain by Cumulocity Official

Committer:
xinlei
Date:
Mon Aug 08 11:05:57 2016 +0000
Revision:
138:f8ab852e83e7
Parent:
136:a52821cdb108
Etisalat and Teleena APN.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
xinlei 100:dbcd3bc51758 1 #ifndef LOCATION_H
xinlei 100:dbcd3bc51758 2 #define LOCATION_H
xinlei 100:dbcd3bc51758 3 #include "mbed.h"
xinlei 100:dbcd3bc51758 4 #include "GPSTracker.h"
xinlei 100:dbcd3bc51758 5 #include "AbstractReporter.h"
xinlei 100:dbcd3bc51758 6
xinlei 100:dbcd3bc51758 7
xinlei 100:dbcd3bc51758 8 class Location: public AbstractReporter
xinlei 100:dbcd3bc51758 9 {
xinlei 100:dbcd3bc51758 10 public:
xinlei 123:311fa85af2b3 11 Location(): gpsTracker(), timer() {
xinlei 100:dbcd3bc51758 12 oldValues[0] = 0;
xinlei 100:dbcd3bc51758 13 oldValues[1] = 0;
xinlei 100:dbcd3bc51758 14 oldValues[2] = 0;
xinlei 123:311fa85af2b3 15 timer.start();
xinlei 100:dbcd3bc51758 16 }
xinlei 100:dbcd3bc51758 17 virtual ~Location() {}
xinlei 100:dbcd3bc51758 18 virtual bool init() { return true; }
xinlei 100:dbcd3bc51758 19 virtual const char* name() const { return "GPS"; }
xinlei 136:a52821cdb108 20 virtual int read(char*, size_t, char*, size_t);
xinlei 100:dbcd3bc51758 21 private:
xinlei 100:dbcd3bc51758 22 GPSTracker gpsTracker;
xinlei 100:dbcd3bc51758 23 float oldValues[3];
xinlei 123:311fa85af2b3 24 Timer timer;
xinlei 100:dbcd3bc51758 25 };
xinlei 100:dbcd3bc51758 26
xinlei 100:dbcd3bc51758 27 #endif /* LOCATION_H */