2023-03-26 19:28:13 +00:00
|
|
|
#include "pico/stdlib.h"
|
2023-04-01 08:40:30 +00:00
|
|
|
#include "Trajectoire.h"
|
2023-03-26 19:28:13 +00:00
|
|
|
|
|
|
|
#ifndef STRATEGIE_H
|
|
|
|
#define STRATEGIE_H
|
|
|
|
|
2023-03-28 21:03:35 +00:00
|
|
|
#define COULEUR 15
|
|
|
|
#define TIRETTE 14
|
2023-04-01 08:40:30 +00:00
|
|
|
#define DEGREE_EN_RADIAN (M_PI / 180.)
|
2023-03-28 21:03:35 +00:00
|
|
|
|
2023-03-03 18:50:44 +00:00
|
|
|
enum etat_action_t{
|
|
|
|
ACTION_EN_COURS,
|
|
|
|
ACTION_TERMINEE
|
2023-03-18 16:59:15 +00:00
|
|
|
};
|
|
|
|
|
2023-03-26 14:34:06 +00:00
|
|
|
enum longer_direction_t{
|
|
|
|
LONGER_VERS_A,
|
|
|
|
LONGER_VERS_C
|
|
|
|
};
|
|
|
|
|
2023-03-28 21:03:35 +00:00
|
|
|
enum couleur_t{
|
|
|
|
COULEUR_BLEU=0,
|
|
|
|
COULEUR_VERT
|
|
|
|
};
|
|
|
|
|
|
|
|
extern enum etat_strategie_t{
|
|
|
|
STRATEGIE_INIT=0,
|
|
|
|
APPROCHE_CERISE_1_A=1,
|
|
|
|
APPROCHE_CERISE_1_B=2,
|
|
|
|
ATTRAPE_CERISE_1=3,
|
|
|
|
APPROCHE_PANIER_1=4,
|
2023-03-29 21:12:16 +00:00
|
|
|
APPROCHE_PANIER_2=5,
|
|
|
|
CALAGE_PANIER_1=6,
|
|
|
|
RECULE_PANIER=7,
|
|
|
|
LANCE_DANS_PANIER=8,
|
2023-03-28 21:03:35 +00:00
|
|
|
STRATEGIE_FIN=254,
|
|
|
|
}etat_strategie;
|
|
|
|
|
2023-03-26 14:34:06 +00:00
|
|
|
enum etat_action_t cerise_accostage(void);
|
2023-03-28 21:03:35 +00:00
|
|
|
enum etat_action_t avance_puis_longe_bordure(enum longer_direction_t longer_direction);
|
2023-04-01 08:40:30 +00:00
|
|
|
enum etat_action_t parcourt_trajet_simple(struct trajectoire_t trajectoire, uint32_t step_ms);
|
2023-03-26 19:28:13 +00:00
|
|
|
void Homologation(uint32_t step_ms);
|
2023-03-28 21:03:35 +00:00
|
|
|
enum couleur_t lire_couleur(void);
|
|
|
|
uint attente_tirette(void);
|
|
|
|
|
|
|
|
|
2023-03-26 19:28:13 +00:00
|
|
|
|
|
|
|
// STRATEGIE_H
|
|
|
|
#endif
|