Strategie ninja 2, 1 seul sursaut au rebroussement
This commit is contained in:
parent
3e5a8d0f4a
commit
9b69210d36
21
Strategie.c
21
Strategie.c
@ -152,6 +152,7 @@ enum etat_action_t Strategie_Ninja_2(uint32_t step_ms, enum couleur_t couleur){
|
|||||||
case NINJA_INIT:
|
case NINJA_INIT:
|
||||||
if(couleur == COULEUR_JAUNE){
|
if(couleur == COULEUR_JAUNE){
|
||||||
Localisation_set(645, 1870, 0);
|
Localisation_set(645, 1870, 0);
|
||||||
|
Trajet_config(TRAJECT_CONFIG_STD);
|
||||||
Trajectoire_bezier(&trajectoire1,
|
Trajectoire_bezier(&trajectoire1,
|
||||||
645, 1870,
|
645, 1870,
|
||||||
935, 1870,
|
935, 1870,
|
||||||
@ -163,13 +164,12 @@ enum etat_action_t Strategie_Ninja_2(uint32_t step_ms, enum couleur_t couleur){
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NINJA_GRENIER1A:
|
case NINJA_GRENIER1A:
|
||||||
Trajet_config(TRAJECT_CONFIG_STD);
|
|
||||||
if(Strategie_parcourir_trajet(trajectoire1, step_ms, EVITEMENT_SANS_EVITEMENT) == ACTION_TERMINEE){
|
if(Strategie_parcourir_trajet(trajectoire1, step_ms, EVITEMENT_SANS_EVITEMENT) == ACTION_TERMINEE){
|
||||||
etat_sss = NINJA_GRENIER1B;
|
etat_sss = NINJA_GRENIER1B;
|
||||||
if(couleur == COULEUR_JAUNE){
|
if(couleur == COULEUR_JAUNE){
|
||||||
Trajet_config(100,100);
|
Trajet_config(100,100);
|
||||||
Trajectoire_bezier(&trajectoire1,
|
Trajectoire_bezier(&trajectoire1,
|
||||||
Localisation_get().x_mm, Localisation_get().y_mm,
|
1315-50, 1920,
|
||||||
1270-50, 1920,
|
1270-50, 1920,
|
||||||
1230-50, 1900,
|
1230-50, 1900,
|
||||||
1230-50, 1970, 0., 0.);
|
1230-50, 1970, 0., 0.);
|
||||||
@ -192,7 +192,7 @@ enum etat_action_t Strategie_Ninja_2(uint32_t step_ms, enum couleur_t couleur){
|
|||||||
if(couleur == COULEUR_JAUNE){
|
if(couleur == COULEUR_JAUNE){
|
||||||
Trajectoire_bezier(&trajectoire1,
|
Trajectoire_bezier(&trajectoire1,
|
||||||
1230-50, 1970,
|
1230-50, 1970,
|
||||||
1230, 1900,
|
1230-50, 1900,
|
||||||
1255, 1725,
|
1255, 1725,
|
||||||
1195, 1725, 0., 0.);
|
1195, 1725, 0., 0.);
|
||||||
}
|
}
|
||||||
@ -247,20 +247,19 @@ enum etat_action_t Strategie_Ninja_2(uint32_t step_ms, enum couleur_t couleur){
|
|||||||
case NINJA_GRENIER2B:
|
case NINJA_GRENIER2B:
|
||||||
if(Strategie_parcourir_trajet(trajectoire1, step_ms, EVITEMENT_SANS_EVITEMENT) == ACTION_TERMINEE){
|
if(Strategie_parcourir_trajet(trajectoire1, step_ms, EVITEMENT_SANS_EVITEMENT) == ACTION_TERMINEE){
|
||||||
etat_sss = NINJA_GRENIER2C;
|
etat_sss = NINJA_GRENIER2C;
|
||||||
Trajectoire_droite(&trajectoire1,
|
Trajet_config(TRAJECT_CONFIG_STD);
|
||||||
1260, 1775,
|
if(couleur == COULEUR_JAUNE){
|
||||||
1400, 1775,
|
Trajectoire_droite(&trajectoire1,
|
||||||
0., 0.);
|
1260, 1775,
|
||||||
|
1400, 1775,
|
||||||
|
0., 0.);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NINJA_GRENIER2C:
|
case NINJA_GRENIER2C:
|
||||||
if(Strategie_parcourir_trajet(trajectoire1, step_ms, EVITEMENT_SANS_EVITEMENT) == ACTION_TERMINEE){
|
if(Strategie_parcourir_trajet(trajectoire1, step_ms, EVITEMENT_SANS_EVITEMENT) == ACTION_TERMINEE){
|
||||||
etat_sss = NINJA_FIN;
|
etat_sss = NINJA_FIN;
|
||||||
Trajectoire_droite(&trajectoire1,
|
|
||||||
1260, 1775,
|
|
||||||
1400, 1775,
|
|
||||||
0., 0.);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
4
main.c
4
main.c
@ -132,8 +132,8 @@ void gestion_PAMI(uint32_t step_ms, int * asser_pos){
|
|||||||
// Tempo action : 100 s
|
// Tempo action : 100 s
|
||||||
uint32_t tempo_demarrage_ms, tempo_action_ms;
|
uint32_t tempo_demarrage_ms, tempo_action_ms;
|
||||||
if(get_identifiant() == 0){
|
if(get_identifiant() == 0){
|
||||||
tempo_demarrage_ms = 0;
|
tempo_demarrage_ms = 2000;
|
||||||
tempo_action_ms = 100000;
|
tempo_action_ms = 980000;
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
// Autres
|
// Autres
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user