Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
lego15
NXT_Programming_Lesson_7
Commits
308f1610
Commit
308f1610
authored
Apr 21, 2016
by
Enniwhere
Browse files
Made the robot return to center after looking right
parent
cfe3ef27
Pipeline
#3155
skipped
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/AvoidFigure9_3_Upg.java
View file @
308f1610
...
...
@@ -61,7 +61,11 @@ public class AvoidFigure9_3_Upg {
if
(
leftDistance
<
stopThreshold
&&
rightDistance
<
stopThreshold
&&
frontDistance
<
stopThreshold
){
// Drive backwards for 2 times ms milliseconds
// Return to center
car
.
backward
(
power
,
0
);
Delay
.
msDelay
(
ms
);
// Drive backwards for 4 times ms milliseconds
car
.
backward
(
power
,
power
);
Delay
.
msDelay
(
ms
*
4
);
car
.
stop
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment