Ajout du déclenchement du déguisement
This commit is contained in:
		
							parent
							
								
									f05aa9d264
								
							
						
					
					
						commit
						b06f1c631a
					
				
							
								
								
									
										15
									
								
								Test.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								Test.c
									
									
									
									
									
								
							| @ -543,6 +543,9 @@ int test_i2c_ecriture_pico_annex_nb_2(){ | ||||
|     enum i2c_resultat_t retour_i2c = I2C_EN_COURS; | ||||
| 
 | ||||
| 
 | ||||
|      | ||||
|     printf("D - Deguisement On\n"); | ||||
|     printf("E - Deguisement Off\n"); | ||||
|     printf("F - Ferme porte\n"); | ||||
|     printf("G - Mi-Ferme porte\n"); | ||||
|     printf("O - Ouvre porte\n"); | ||||
| @ -568,6 +571,18 @@ int test_i2c_ecriture_pico_annex_nb_2(){ | ||||
|         if(lettre != PICO_ERROR_TIMEOUT && lettre != '\0'){ | ||||
|             printf("lettre !\n"); | ||||
|             switch(lettre){ | ||||
|                 case 'd': | ||||
|                 case 'D': | ||||
|                     i2c_annexe_active_deguisement(); | ||||
|                     printf("=> Active déguisement\n"); | ||||
|                     break; | ||||
| 
 | ||||
|                 case 'E': | ||||
|                 case 'e': | ||||
|                     i2c_annexe_desactive_deguisement(); | ||||
|                     printf("=> Desactive déguisement\n"); | ||||
|                     break; | ||||
| 
 | ||||
|                 case 'F': | ||||
|                 case 'f': | ||||
|                     i2c_annexe_ferme_porte(); | ||||
|  | ||||
| @ -107,6 +107,15 @@ void i2c_annexe_desactive_propulseur(void){ | ||||
|     donnees_a_envoyer=1; | ||||
| } | ||||
| 
 | ||||
| void i2c_annexe_active_deguisement(void){ | ||||
|     donnees_emission[ADRESSE_TURBINE_PORTE - ADRESSE_DEBUT_W] |= 0x10; | ||||
|     donnees_a_envoyer=1; | ||||
| } | ||||
| void i2c_annexe_desactive_deguisement(void){ | ||||
|     donnees_emission[ADRESSE_TURBINE_PORTE - ADRESSE_DEBUT_W] &= 0xEF; | ||||
|     donnees_a_envoyer=1; | ||||
| } | ||||
| 
 | ||||
| void i2c_annexe_envoie_score(uint8_t score){ | ||||
|     donnees_emission[ADRESSE_SCORE - ADRESSE_DEBUT_W] = score; | ||||
|     donnees_a_envoyer=1; | ||||
|  | ||||
| @ -24,3 +24,6 @@ uint8_t i2c_annexe_get_contacteur_longer_C(void); | ||||
| 
 | ||||
| void i2c_annexe_get_distances(uint8_t *distance_capteur_cm); | ||||
| void i2c_annexe_couleur_balise(uint8_t couleur, uint16_t masque_led); | ||||
| 
 | ||||
| void i2c_annexe_active_deguisement(void); | ||||
| void i2c_annexe_desactive_deguisement(void); | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user