Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Vicente Castellano Gómez
/
robotAmbientales
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
ce3a5a7f
authored
May 03, 2024
by
Vicente Castellano Gómez
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Giro retocado, creado gira derecha, gira izquierda
parent
eac09de1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
5 deletions
robot.py
robot.py
View file @
ce3a5a7f
...
@@ -70,8 +70,7 @@ class Robot:
...
@@ -70,8 +70,7 @@ class Robot:
for
i
in
range
(
abs
(
ajuste
)):
for
i
in
range
(
abs
(
ajuste
)):
if
(
ajuste
>
0
):
if
(
ajuste
>
0
):
self
.
robot
.
turn
(
1
)
self
.
robot
.
turn
(
1
)
else
:
elif
(
ajuste
<
0
):
if
(
ajuste
<
0
):
self
.
robot
.
turn
(
-
1
)
self
.
robot
.
turn
(
-
1
)
def
giraDerecha
(
self
):
def
giraDerecha
(
self
):
...
@@ -96,18 +95,15 @@ class Robot:
...
@@ -96,18 +95,15 @@ class Robot:
self
.
w
=
self
.
valorW
self
.
w
=
self
.
valorW
negroAnteriorFlag
=
self
.
negroFlag
negroAnteriorFlag
=
self
.
negroFlag
self
.
negroFlag
=
False
self
.
negroFlag
=
False
self
.
velocidad
=
50
elif
self
.
is_black
(
rgb
):
elif
self
.
is_black
(
rgb
):
negroAnteriorFlag
=
self
.
negroFlag
negroAnteriorFlag
=
self
.
negroFlag
self
.
negroFlag
=
True
self
.
negroFlag
=
True
self
.
w
=
0
self
.
w
=
0
self
.
velocidad
=
50
else
:
else
:
negroAnteriorFlag
=
self
.
negroFlag
negroAnteriorFlag
=
self
.
negroFlag
self
.
negroFlag
=
False
self
.
negroFlag
=
False
self
.
w
=
-
self
.
valorW
self
.
w
=
-
self
.
valorW
self
.
velocidad
=
50
#Fase de ejecución
#Fase de ejecución
#Incremento negro al entrar
#Incremento negro al entrar
...
...
Write
Preview
Markdown
is supported
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