Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 |
--- 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);
}
--- 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.
