From 5a458301834ac89b0dc4303a89e7c0c46bcb8ed1 Mon Sep 17 00:00:00 2001 From: Samuel Date: Wed, 25 Feb 2026 22:03:50 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20de=20la=20tempo=20qui=20n'=C3=A9ta?= =?UTF-8?q?it=20pas=20une=20tempo=20+=20suppresion=20code=20comment=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- program/main_controller/src/motion_control.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/program/main_controller/src/motion_control.c b/program/main_controller/src/motion_control.c index 38aa2ce..bcb0657 100644 --- a/program/main_controller/src/motion_control.c +++ b/program/main_controller/src/motion_control.c @@ -73,17 +73,12 @@ void motion_control_update(void) if(elapsed_time_ms >= MSG_DELAY_MS) { + elapsed_time_ms = 0; // Send motors speed via I2C uint8_t data[5]; data[0] = 0x00; /// registre - //data.motor1_speed = (uint8_t)abs((int)motor1_speed); - //data.motor2_speed = (uint8_t)abs((int)motor2_speed); - - //data.motor1_speed = (uint8_t)abs((int)robot.udp_client.data.hard.inputs.joystick_x); - //data.motor2_speed = (uint8_t)abs((int)robot.udp_client.data.hard.inputs.joystick_x); - data[1] = (uint8_t)abs((int)motor1_speed); data[2] = (uint8_t)abs((int)motor2_speed); @@ -94,15 +89,5 @@ void motion_control_update(void) { puts("Motion controller not reachable"); } - /* - if(i2c_write_blocking(I2C_MASTER_INSTANCE, I2C_MOTION_CONTROLLER_ADDRESS, ®, 1, true) == PICO_ERROR_GENERIC) - { - puts("Motion controller not reachable"); - } - - if(i2c_write_blocking(I2C_MASTER_INSTANCE, I2C_MOTION_CONTROLLER_ADDRESS, data.raw, MSG_LEN, false) == PICO_ERROR_GENERIC) - { - puts("Motion controller not reachable"); - }*/ } }