From 44c8c72993bc9f81cce2b968c2689f2d5ab244a5 Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 25 Jan 2025 17:02:34 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20des=20positions=20de=20d=C3=A9marr?= =?UTF-8?q?age?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Servomoteur.c | 4 ++-- main.c | 9 +++++---- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Servomoteur.c b/Servomoteur.c index 682685d..8c4002e 100644 --- a/Servomoteur.c +++ b/Servomoteur.c @@ -61,13 +61,13 @@ void Servomoteur_init(){ void Servo_pince_tient(){ pwm_set_chan_level(2, PWM_CHAN_A, 2800); - pwm_set_chan_level(5, PWM_CHAN_B, 1500); + pwm_set_chan_level(5, PWM_CHAN_B, 1350); pwm_set_chan_level(2, PWM_CHAN_B, 2650); } void Servo_pince_lache(){ pwm_set_chan_level(2, PWM_CHAN_A, 1700); - pwm_set_chan_level(5, PWM_CHAN_B, 2700); + pwm_set_chan_level(5, PWM_CHAN_B, 2550); pwm_set_chan_level(2, PWM_CHAN_B, 1500); } diff --git a/main.c b/main.c index e7e621a..13afc39 100644 --- a/main.c +++ b/main.c @@ -51,8 +51,8 @@ void main(void) vitesse_angle = reception[2] - 128; switch(reception[3]){ - case 0: Servo_pince_tient(); break; - case 1: Servo_pince_lache(); break; + case 0: Servo_pince_lache(); break; + case 1: Servo_pince_tient(); break; } switch(reception[4]){ @@ -60,8 +60,9 @@ void main(void) case 1: Servo_deplie_banderole(); break; } switch(reception[5]){ - case 0: Servo_came_pousse(); break; - case 1: Servo_came_neutre(); break; + case 0: Servo_came_neutre(); break; + case 1: Servo_came_pousse(); break; + } }