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: main.cpp
- Revision:
- 23:953651133b29
- Parent:
- 22:1a02d66218e4
- Child:
- 24:249505c7c080
--- a/main.cpp Sun May 21 03:09:44 2017 +0000
+++ b/main.cpp Sun May 21 03:42:53 2017 +0000
@@ -52,7 +52,7 @@
if (finished_traverse_one_cell == true) {
- if (!driver->has_right_wall() && !driver->has_left_wall()) {
+ /*if (!driver->has_right_wall() && !driver->has_left_wall()) {
wait(1);
if ((rand() % 4) == 0) {
state = LEFT;
@@ -64,7 +64,7 @@
}
}
- else if (!driver->has_right_wall()) {
+ else */if (!driver->has_right_wall()) {
wait(0.25);
state = RIGHT;
driver->resetEncoders();
@@ -86,7 +86,7 @@
}
finished_traverse_one_cell = false;
}
-
+ state = STRAIGHT;
if (state == STRAIGHT) {
if (!driver->should_finish_drive_forward() && !driver-> has_front_wall()) {