Ajout de la rotation dans la machine a état.

This commit is contained in:
Ulysse Cura 2025-02-01 06:06:13 +01:00
parent 864f0128f1
commit c71de263f8
1 changed files with 13 additions and 13 deletions

View File

@ -6,7 +6,7 @@
#include "IO.hpp"
// Unit tests activation
#define UNIT_TESTS
//#define UNIT_TESTS
/*
Etapes :
@ -136,15 +136,6 @@ void loop()
break;
case State::Turn90Blue:
my_IO.setDirWithAngularSpeed(90.0f);
if(my_IO.getAngle(Axes::Z) >= 88.0f)
{
actual_state = State::ForwardToSceneEdge;
}
break;
case State::Turn90Yellow:
my_IO.setDirWithAngularSpeed(-90.0f);
if(my_IO.getAngle(Axes::Z) < -88.0f)
@ -153,10 +144,19 @@ void loop()
}
break;
case State::ForwardToSceneEdge:
my_IO.setSpeed(2048.0f);
case State::Turn90Yellow:
my_IO.setDirWithAngularSpeed(90.0f);
if(my_IO.getAngle(Axes::Y) > 1.0f)
if(my_IO.getAngle(Axes::Z) >= 88.0f)
{
actual_state = State::ForwardToSceneEdge;
}
break;
case State::ForwardToSceneEdge:
my_IO.setSpeed(1024.0f);
if(my_IO.getAngle(Axes::Y) > 5.0f)
{
actual_state = State::Dancing;
}