From c3580f95259466591036bf916b4e46c43154567c Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 6 May 2023 22:20:58 +0200 Subject: [PATCH] =?UTF-8?q?Homog=C3=A9n=C3=A9isation=20des=20indices,=20ce?= =?UTF-8?q?rtains=20comptaient=20de=201=20=C3=A012,=20d'autres=20de=200=20?= =?UTF-8?q?=C3=A0=2011.=20Alignement=20sur=200=20=C3=A0=2011.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SelectionCapteur.c | 5 ++--- VL53L1X_Fonctions.c | 2 +- main.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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