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 POTENTIOMETER_H
xinlei 100:dbcd3bc51758 2 #define POTENTIOMETER_H
xinlei 100:dbcd3bc51758 3 #include "mbed.h"
xinlei 100:dbcd3bc51758 4 #include "AbstractReporter.h"
xinlei 100:dbcd3bc51758 5
xinlei 100:dbcd3bc51758 6
xinlei 100:dbcd3bc51758 7 class Potentiometer: public AbstractReporter
xinlei 100:dbcd3bc51758 8 {
xinlei 100:dbcd3bc51758 9 public:
xinlei 123:311fa85af2b3 10 Potentiometer(): timer() {
xinlei 100:dbcd3bc51758 11 oldValues[0] = 0;
xinlei 100:dbcd3bc51758 12 oldValues[1] = 0;
xinlei 123:311fa85af2b3 13 timer.start();
xinlei 100:dbcd3bc51758 14 }
xinlei 100:dbcd3bc51758 15 virtual ~Potentiometer() {}
xinlei 100:dbcd3bc51758 16 virtual bool init() { return true; }
xinlei 100:dbcd3bc51758 17 virtual const char* name() const { return "Poti"; }
xinlei 136:a52821cdb108 18 virtual int read(char*, size_t, char*, size_t);
xinlei 100:dbcd3bc51758 19 private:
xinlei 100:dbcd3bc51758 20 float oldValues[2];
xinlei 123:311fa85af2b3 21 Timer timer;
xinlei 100:dbcd3bc51758 22 };
xinlei 100:dbcd3bc51758 23
xinlei 100:dbcd3bc51758 24 #endif /* POTENTIOMETER_H */