Skip to content

Commit

Permalink
Modified turn to vary duration based on obstacle or edge. v1.0.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidskeck committed Apr 24, 2014
1 parent bf03d57 commit d969979
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CurioDuinoOBS/CurioDuinoOBS.ino
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void checkDataAndWait()
}
}

//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// Declare a stack with 64 bytes beyond context switch and interrupt needs.
NIL_WORKING_AREA(waThread1, 64);

Expand Down Expand Up @@ -91,13 +91,13 @@ NIL_THREAD(Thread2, arg) {
if (data.leftEdge)
{
nav.goReverse();
nav.turnRight();
nav.turnRight(EDGE_TURN_DURATION);
}

else
{
nav.goReverse();
nav.turnLeft();
nav.turnLeft(EDGE_TURN_DURATION);
}

nav.goForward();
Expand Down Expand Up @@ -126,11 +126,11 @@ NIL_THREAD(Thread3, arg) {

if (rand == 1)
{
nav.turnLeft();
nav.turnLeft(OBSTACLE_TURN_DURATION);
}
else
{
nav.turnRight();
nav.turnRight(OBSTACLE_TURN_DURATION);
}
}

Expand Down

0 comments on commit d969979

Please sign in to comment.