A Library to drive the RenBuggy_Servo.
Dependencies: PinDetect
Fork of RenBuggyServo by
Revision 6:5767cb4ed8de, committed 2014-03-31
- Comitter:
- ELloyd
- Date:
- Mon Mar 31 12:54:28 2014 +0000
- Parent:
- 5:c06b90175a54
- Commit message:
- Prevented overriding of functions.
Changed in this revision
Car.cpp | Show annotated file Show diff for this revision Revisions of this file |
Car.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r c06b90175a54 -r 5767cb4ed8de Car.cpp --- a/Car.cpp Mon Mar 31 07:49:08 2014 +0000 +++ b/Car.cpp Mon Mar 31 12:54:28 2014 +0000 @@ -83,7 +83,7 @@ m_encoderCount++; } -void Car::forwards(float distance) { +void Car::forwards_measured(float distance) { int countsForward = (int)(distance * (m_countsPerRevolution / m_wheelCircumference)); @@ -104,7 +104,7 @@ return; } -void Car::forwards() { +void Car::forwards_timed() { m_motor.pulsewidth_us(m_speed); }
diff -r c06b90175a54 -r 5767cb4ed8de Car.h --- a/Car.h Mon Mar 31 07:49:08 2014 +0000 +++ b/Car.h Mon Mar 31 12:54:28 2014 +0000 @@ -124,13 +124,13 @@ * distance. * @param distance is how far the car will travel, in cm. */ - void forwards(float distance); + void forwards_measured(float distance); /** * Moves the car in the direction it is facing, until a user * tells it to stop. */ - void forwards(); + void forwards_timed(); /** * Stops the car from moving.