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
9799c723
Unverified
Commit
9799c723
authored
Nov 09, 2015
by
Cédric Bonhomme
Browse files
Fine-tune 90 degree rotations.
parent
a7d55ddb
Changes
2
Hide whitespace changes
Inline
Side-by-side
web/__init__.py
View file @
9799c723
...
...
@@ -44,4 +44,7 @@ except Exception as e:
print
e
pass
#raise Exception('You must run the application on the EV3.')
right_wheel
.
position
=
0
left_wheel
.
position
=
0
from
web
import
views
web/views/views.py
View file @
9799c723
...
...
@@ -79,7 +79,7 @@ def move(direction="forward", speed=800):
speed
=
600
forever
=
request
.
args
.
get
(
"forever"
,
None
)
if
None
is
forever
:
movements
.
rotate
(
left_wheel
,
right_wheel
,
-
3
4
0
,
3
4
0
,
90
,
0
)
movements
.
rotate
(
left_wheel
,
right_wheel
,
-
3
0
0
,
3
0
0
,
90
,
0
)
else
:
left_wheel
.
run_forever
(
speed
*
-
1
,
regulation_mode
=
False
)
right_wheel
.
run_forever
(
speed
,
regulation_mode
=
False
)
...
...
@@ -88,7 +88,7 @@ def move(direction="forward", speed=800):
speed
=
600
forever
=
request
.
args
.
get
(
"forever"
,
None
)
if
None
is
forever
:
movements
.
rotate
(
left_wheel
,
right_wheel
,
3
4
0
,
-
3
4
0
,
0
,
90
)
movements
.
rotate
(
left_wheel
,
right_wheel
,
3
0
0
,
-
3
0
0
,
0
,
90
)
else
:
left_wheel
.
run_forever
(
speed
,
regulation_mode
=
False
)
right_wheel
.
run_forever
(
speed
*
-
1
,
regulation_mode
=
False
)
...
...
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