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: mbed
Diff: AutoDrive.cpp
- Revision:
- 5:695c5531f65e
- Parent:
- 2:cb6bae534500
- Child:
- 14:0caa7b93af7a
diff -r aff0722b4e50 -r 695c5531f65e AutoDrive.cpp
--- a/AutoDrive.cpp Sat Apr 28 12:09:27 2018 +0000
+++ b/AutoDrive.cpp Sun Apr 29 11:48:33 2018 +0000
@@ -9,13 +9,13 @@
int action = 0;
int speed = 3;
int placeholder = 1;
- void AutoDrive(const int route[][2]){
+ void AutoDrive(const int route[]){
- while(route[action][0] != 0){
+ while(route[action] != 100){
- switch(route[action][0]){
+ switch(route[action]){
case 1: // Fulldrive
- driveOne(speed,route[action][1]);
+ driveOne(speed,route[action+1]);
break;
case 2: // turn Right