Kallums Fork
Fork of SteeringServo by
Diff: SteeringServo.h
- Revision:
- 1:88fe796b4c2e
- Parent:
- 0:5141c5e51f39
- Child:
- 2:80a7bb0d71af
- Child:
- 3:f81145ed8daa
diff -r 5141c5e51f39 -r 88fe796b4c2e SteeringServo.h --- a/SteeringServo.h Fri Jun 23 23:36:13 2017 +0000 +++ b/SteeringServo.h Sat Sep 02 00:52:36 2017 +0000 @@ -80,13 +80,19 @@ /** Goto the centre position. (Drive Straight) * */ - void goStraight(void); + void goStraight(void); + + /** Get the currentPulseWidth + * + */ + int getPulseWidth(void) private: PwmOut servo_; // -- PWM Object int minimumPulseWidth_; // -- (us) Minimum pulse width that servo can move to (due to mechanical constraints) int maximumPulseWidth_; // -- (us) Maximum pulse width that servo can move to (due to mechanical constraints) int centrePulseWidth_; // -- (us) Pulse Width to move to drive straight + int currentPulseWidth_; // -- (us) Current Pulse Width of the servo }; #endif