Pilotage du bras "pousse gateau"
This commit is contained in:
		
							parent
							
								
									727197d9f4
								
							
						
					
					
						commit
						16f50c9447
					
				
							
								
								
									
										14
									
								
								Test.c
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								Test.c
									
									
									
									
									
								
							| @ -567,6 +567,8 @@ int test_i2c_ecriture_pico_annex_nb_2(){ | ||||
|     printf("P - Propulseur On\n"); | ||||
|     printf("M - Propulseur Off\n"); | ||||
|     printf("S - Score + 1\n"); | ||||
|     printf("B - Bras deplie\n"); | ||||
|     printf("N - Bras plie 1\n"); | ||||
|      | ||||
| 
 | ||||
|     int lettre; | ||||
| @ -650,6 +652,18 @@ int test_i2c_ecriture_pico_annex_nb_2(){ | ||||
|                     i2c_annexe_envoie_score(score); | ||||
|                     break; | ||||
| 
 | ||||
|                 case 'b': | ||||
|                 case 'B': | ||||
|                     i2c_annexe_deplie_bras(); | ||||
|                     printf("=> Deplie bras\n"); | ||||
|                     break; | ||||
| 
 | ||||
|                 case 'n': | ||||
|                 case 'N': | ||||
|                     i2c_annexe_plie_bras(); | ||||
|                     printf("=> Plie bras\n"); | ||||
|                     break; | ||||
|                  | ||||
|                 default: | ||||
|                     printf("lettre non reconnue: %d %c\n", lettre, lettre); | ||||
|             } | ||||
|  | ||||
| @ -115,6 +115,15 @@ void i2c_annexe_desactive_deguisement(void){ | ||||
|     donnees_a_envoyer=1; | ||||
| } | ||||
| 
 | ||||
| void i2c_annexe_deplie_bras(void){ | ||||
|     donnees_emission[ADRESSE_TURBINE_PORTE - ADRESSE_DEBUT_W] |= 0x20; | ||||
|     donnees_a_envoyer=1; | ||||
| } | ||||
| void i2c_annexe_plie_bras(void){ | ||||
|     donnees_emission[ADRESSE_TURBINE_PORTE - ADRESSE_DEBUT_W] &= 0xDF; | ||||
|     donnees_a_envoyer=1; | ||||
| } | ||||
| 
 | ||||
| void i2c_annexe_envoie_score(uint8_t score){ | ||||
|     donnees_emission[ADRESSE_SCORE - ADRESSE_DEBUT_W] = score; | ||||
|     donnees_a_envoyer=1; | ||||
|  | ||||
| @ -28,4 +28,7 @@ void i2c_annexe_couleur_balise(uint8_t couleur, uint16_t masque_led); | ||||
| void i2c_annexe_active_deguisement(void); | ||||
| void i2c_annexe_desactive_deguisement(void); | ||||
| 
 | ||||
| void i2c_annexe_plie_bras(void); | ||||
| void i2c_annexe_deplie_bras(void); | ||||
| 
 | ||||
| uint8_t i2c_annexe_get_tension_batterie(void); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user