54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
#include "pico/stdlib.h"
|
|
#include "Localisation.h"
|
|
#include "Temps.h"
|
|
#include "Trajectoire.h"
|
|
#include "Trajet.h"
|
|
|
|
|
|
#ifndef STRATEGIE_H
|
|
#define STRATEGIE_H
|
|
|
|
#define COULEUR 15
|
|
#define TIRETTE 14
|
|
//#define CORR_ANGLE_DEPART_DEGREE (-1.145)
|
|
#define CORR_ANGLE_DEPART_DEGREE (0)
|
|
|
|
enum etat_action_t{
|
|
ACTION_EN_COURS,
|
|
ACTION_TERMINEE,
|
|
ACTION_ECHEC
|
|
};
|
|
|
|
enum longer_direction_t{
|
|
LONGER_VERS_A,
|
|
LONGER_VERS_C
|
|
};
|
|
|
|
enum couleur_t{
|
|
COULEUR_BLEU=0,
|
|
COULEUR_JAUNE,
|
|
COULEUR_INCONNUE,
|
|
};
|
|
|
|
enum evitement_t{
|
|
EVITEMENT_SANS_EVITEMENT,
|
|
EVITEMENT_PAUSE_DEVANT_OBSTACLE,
|
|
EVITEMENT_ARRET_DEVANT_OBSTACLE,
|
|
EVITEMENT_RETOUR_SI_OBSTABLE,
|
|
EVITEMENT_CONTOURNEMENT
|
|
};
|
|
|
|
struct objectif_t{
|
|
int priorite;
|
|
enum {A_FAIRE, EN_COURS, BLOQUE, FAIT} etat;
|
|
enum {CERISE_BAS, CERISE_HAUT, CERISE_GAUCHE, CERISE_DROITE,
|
|
ZONE_1, ZONE_2, ZONE_3, ZONE_4, ZONE_5} cible;
|
|
};
|
|
|
|
enum etat_action_t Strategie_super_star(uint32_t step_ms);
|
|
|
|
enum etat_action_t Strategie_parcourir_trajet(struct trajectoire_t trajectoire, uint32_t step_ms, enum evitement_t evitement);
|
|
|
|
// STRATEGIE_H
|
|
#endif
|