Fonction pour calibrer l'angle du Robot en position de départ
This commit is contained in:
		
							parent
							
								
									e7ab63b17e
								
							
						
					
					
						commit
						fe161fe5c2
					
				
							
								
								
									
										11
									
								
								Test.c
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								Test.c
									
									
									
									
									
								
							| @ -696,6 +696,7 @@ void test_trajectoire_teleplot(){ | |||||||
| 
 | 
 | ||||||
| int test_aller_retour(){ | int test_aller_retour(){ | ||||||
|     int lettre, _step_ms = 1, temps_ms=0, _step_ms_gyro=2; |     int lettre, _step_ms = 1, temps_ms=0, _step_ms_gyro=2; | ||||||
|  |     const double corr_angle = 1.145; | ||||||
|     Trajet_init(); |     Trajet_init(); | ||||||
|     struct trajectoire_t trajectoire; |     struct trajectoire_t trajectoire; | ||||||
|     printf("Choix trajectoire :\n"); |     printf("Choix trajectoire :\n"); | ||||||
| @ -704,6 +705,7 @@ int test_aller_retour(){ | |||||||
|     printf("D - Droite\n"); |     printf("D - Droite\n"); | ||||||
|     printf("E - Avance et tourne (ok)\n"); |     printf("E - Avance et tourne (ok)\n"); | ||||||
|     printf("F - Avance et tourne (Nok)\n"); |     printf("F - Avance et tourne (Nok)\n"); | ||||||
|  |     printf("G - Avance (Calibre angle)\n"); | ||||||
|     printf("R - Rotation pure\n"); |     printf("R - Rotation pure\n"); | ||||||
|     do{ |     do{ | ||||||
|          lettre = getchar_timeout_us(TEST_TIMEOUT_US); |          lettre = getchar_timeout_us(TEST_TIMEOUT_US); | ||||||
| @ -745,6 +747,15 @@ int test_aller_retour(){ | |||||||
|             printf("Trajectoire droite avec rotation (Nok)\n"); |             printf("Trajectoire droite avec rotation (Nok)\n"); | ||||||
|             break; |             break; | ||||||
| 
 | 
 | ||||||
|  |         case 'g': | ||||||
|  |         case 'G': | ||||||
|  |             Trajet_config(TRAJECT_CONFIG_AVANCE_ET_TOURNE); | ||||||
|  |             Trajectoire_droite(&trajectoire, 0, 0,  | ||||||
|  |                 2750 * cos((60+90-corr_angle) * (M_PI / 180.)), 2750 * sin((60+90-corr_angle) * (M_PI / 180.)), | ||||||
|  |                 0, 0); | ||||||
|  |             printf("Trajectoire droite pour calibration angle de départ\n"); | ||||||
|  |             break; | ||||||
|  | 
 | ||||||
|         case 'r': |         case 'r': | ||||||
|         case 'R': |         case 'R': | ||||||
|             Trajectoire_rotation(&trajectoire, 0, 0, 0, 700); |             Trajectoire_rotation(&trajectoire, 0, 0, 0, 700); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user