the fish that looks like a jet
Dependencies: ADXL345 ADXL345_I2C IMUfilter ITG3200 mbed Servo
Diff: PwmReader.h
- Revision:
- 6:a4d6f3e4bf28
- Parent:
- 5:090ef6275773
- Child:
- 7:e005cfaff8d1
--- a/PwmReader.h Tue Jan 28 23:59:21 2014 +0000 +++ b/PwmReader.h Wed Jan 29 05:04:50 2014 +0000 @@ -5,7 +5,7 @@ { public: PwmReader(); - PwmReader(PinName pwmInPort); + PwmReader(PinName pwmInPort, float min = 0.0, float max = 1.0); ~PwmReader(); float getDuty(); //0 to 1 @@ -14,10 +14,13 @@ void pwmRise(); //0 to 1 void pwmFall(); //-1 to 1 + private: InterruptIn* di; int lastRise; int period; float duty; - Timer t; + Timer t; + float pwmMin; + float pwmMax; }; \ No newline at end of file