From f2c39d9117712947c7ca07c757bd710e6af6f3d3 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 16 Aug 2025 12:49:50 +0200 Subject: [PATCH] =?UTF-8?q?Test=20avec=20le=20cas=20du=20servo=20qui=20reb?= =?UTF-8?q?oucle=20au=20bout=20de=2021=20tours=20en=20mode=20"basse=20r?= =?UTF-8?q?=C3=A9solution"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 23ecef5..b0cebb2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -124,7 +124,7 @@ enum etat_t mouvement_servomoteur(){ // On avance ou recule de d'un pas position += pas_servo; // si position > 5000 ou position < 0 - if(position > 20100 || position < 0){ + if(position > 40100 || position < 0){ pas_servo = -pas_servo; } sms_sts.WritePosEx(SERVO_ID, position, 4800); @@ -145,7 +145,7 @@ enum etat_t mouvement_servomoteur(){ } int lire_registre(int servo_id, int registre_adresse){ - return sms_sts.readByte(servo_id, registre_adresse); // Resolution à 1 + return sms_sts.readByte(servo_id, registre_adresse); } void lire_tous_les_registres(int servo_id){