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:
- 14:0caa7b93af7a
- Parent:
- 5:695c5531f65e
--- a/AutoDrive.cpp Tue May 08 12:32:31 2018 +0000
+++ b/AutoDrive.cpp Wed May 23 11:50:58 2018 +0000
@@ -2,16 +2,16 @@
#include "MotorDriver.h"
#include "ReadFinalLine.h"
#include "ReadSensor.h"
-#include "Mapping.h"
#include "AutoDrive.h"
#include "RouteCalculation.h"
-
+
+ void autoDrive(char route[]){
+
int action = 0;
int speed = 3;
int placeholder = 1;
- void AutoDrive(const int route[]){
-
- while(route[action] != 100){
+
+ while(route[action] != 5){
switch(route[action]){
case 1: // Fulldrive
@@ -33,7 +33,7 @@
default: printf("Error: route could not be red!");
}
- action = action + 1;
+ action = action + 2;
}
printf("The target destination has been sucessfully reached!");