Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Science Festival 2015
EV3WebController
Commits
91a3ec94
Unverified
Commit
91a3ec94
authored
Nov 10, 2015
by
Cédric Bonhomme
Browse files
wait before the motors are finished.
parent
1c54e07a
Changes
1
Hide whitespace changes
Inline
Side-by-side
web/lib/movements.py
View file @
91a3ec94
...
...
@@ -47,6 +47,9 @@ def check_stop_condition(motorA, motorB):
motorB
.
run_position_limited
(
position_sp
=
180
,
speed_sp
=
800
,
stop_mode
=
Motor
.
STOP_MODE
.
BRAKE
,
ramp_up_sp
=
1000
,
amp_down_sp
=
1000
)
while
"running"
in
motorA
.
state
.
split
(
" "
)
and
\
"running"
in
motorB
.
state
.
split
(
" "
):
time
.
sleep
(
0.1
)
return
"hit_wall"
if
color_sensor
.
colors
[
color_sensor
.
color
]
==
"red"
:
stop
(
motorA
,
motorB
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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