changement trajectoire 2 + détection un peu plus bas pour l'évitement

This commit is contained in:
Samuel 2024-05-10 14:17:07 +02:00
parent b3cf92ee9e
commit 334a9cbf21
2 changed files with 8 additions and 8 deletions

View File

@ -154,7 +154,7 @@ int VL53L8_min_distance(VL53L8CX_ResultsData Results, float *distance){
int min_distance = 2000; int min_distance = 2000;
int col, row; int col, row;
for(col=0; col<8; col++){ for(col=0; col<8; col++){
for(row=0; row<=1; row++){ for(row=0; row<=3; row++){
if(min_distance > Results.distance_mm[col + 8*row]){ if(min_distance > Results.distance_mm[col + 8*row]){
min_distance = Results.distance_mm[col + 8*row]; min_distance = Results.distance_mm[col + 8*row];
} }

14
main.c
View File

@ -97,7 +97,7 @@ void main(void)
while(get_tirette()); while(get_tirette());
sleep_ms(90000); //sleep_ms(90000);
temps_depart_ms = Temps_get_temps_ms(); temps_depart_ms = Temps_get_temps_ms();
@ -245,9 +245,9 @@ void configure_trajet(int identifiant, int couleur){
3000-750, 1400, 3000-750, 2100, 0, 0); 3000-750, 1400, 3000-750, 2100, 0, 0);
break; break;
case 2: case 2:
Localisation_set(3000-1117, 2000-63, 0); Localisation_set(3000-1245, 2000-63, 0);
Trajectoire_bezier(&trajectoire, 3000-1116, 2000-63, 3000-975, 2000-63, Trajectoire_bezier(&trajectoire, 3000-1244, 2000-63, 3000-950, 2000-63,
3000-540, 1400, 3000+60, 1400, -M_PI, -M_PI); 3000-540, 1400, 3100, 1400, M_PI, M_PI);
break; break;
case 3: case 3:
Localisation_set(3000-1130, 2000-63, 0); Localisation_set(3000-1130, 2000-63, 0);
@ -286,9 +286,9 @@ void configure_trajet(int identifiant, int couleur){
750, 1400, 750, 2100, M_PI, M_PI); 750, 1400, 750, 2100, M_PI, M_PI);
break; break;
case 2: case 2:
Localisation_set(1117, 2000-63, M_PI); Localisation_set(1245, 2000-63, M_PI);
Trajectoire_bezier(&trajectoire, 1116, 2000-63, 975, 2000-63, Trajectoire_bezier(&trajectoire, 1244, 2000-63, 950, 2000-63,
540, 1400, -60, 1400, M_PI, M_PI); 540, 1400, -100, 1400, M_PI, M_PI);
break; break;
case 3: case 3:
Localisation_set(1121, 2000-63, M_PI); Localisation_set(1121, 2000-63, M_PI);