Giro retocado, creado gira derecha, gira izquierda

parent eac09de1
Showing with 2 additions and 6 deletions
......@@ -70,9 +70,8 @@ class Robot:
for i in range(abs(ajuste)):
if (ajuste > 0):
self.robot.turn(1)
else:
if (ajuste < 0):
self.robot.turn(-1)
elif (ajuste < 0):
self.robot.turn(-1)
def giraDerecha(self):
self.robot.straight(60)
......@@ -96,18 +95,15 @@ class Robot:
self.w = self.valorW
negroAnteriorFlag= self.negroFlag
self.negroFlag = False
self.velocidad = 50
elif self.is_black(rgb):
negroAnteriorFlag = self.negroFlag
self.negroFlag = True
self.w = 0
self.velocidad = 50
else:
negroAnteriorFlag= self.negroFlag
self.negroFlag = False
self.w = -self.valorW
self.velocidad = 50
#Fase de ejecución
#Incremento negro al entrar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment