diff --git a/SelectionCapteur.c b/SelectionCapteur.c index ee1b6bf..21e0f79 100644 --- a/SelectionCapteur.c +++ b/SelectionCapteur.c @@ -22,10 +22,9 @@ void Selection_capteur_init(void){ } /// @brief Désactive le capteur en question -/// @param capteur capteur, numéroté de 1 à 12 +/// @param capteur capteur, numéroté de 0 à 11 void Selection_capteur_select(uint32_t capteur){ uint32_t io_value; - capteur = capteur - 1; io_value = 0; io_value |= ((capteur & 0x08) >> 3) << 2; @@ -43,5 +42,5 @@ void Selection_capteur_init_pin_low(uint pin){ } void Selection_capteur_deselect(){ - Selection_capteur_select(16); + Selection_capteur_select(15); } \ No newline at end of file diff --git a/VL53L1X_Fonctions.c b/VL53L1X_Fonctions.c index c75e0d2..dae70a7 100644 --- a/VL53L1X_Fonctions.c +++ b/VL53L1X_Fonctions.c @@ -46,7 +46,7 @@ void initialise_adresses(void){ // Pour chaque capteur for(uint capteur=0; capteur