From 5eb86259161a1561e31839fb9e74560c74c1472e Mon Sep 17 00:00:00 2001 From: Samuel Date: Sat, 18 Apr 2026 18:06:27 +0200 Subject: [PATCH] Corrections mineures --- main.c | 9 ++++----- messages_propulsion.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/main.c b/main.c index 9e47798..6e5db98 100644 --- a/main.c +++ b/main.c @@ -203,11 +203,9 @@ void main(void) msg_trajectoire.trajectoire.p4.x, msg_trajectoire.trajectoire.p4.y); trajectoire = msg_trajectoire.trajectoire; mode = 4; - enum etat_action_t etat_action = ACTION_EN_COURS; - mise_données_dans_échange((uint8_t*) &(etat_action), sizeof(etat_action), REG_PROPULSION_ETAT_TRJET); + uint8_t etat_action = ACTION_EN_COURS; + mise_données_dans_échange((uint8_t*) &(etat_action), sizeof(etat_action), REG_PROPULSION_ETAT_TRAJET); Trajet_config(200, 100); - - // Oh la la ! } } @@ -290,7 +288,8 @@ void main(void) break; case 4: etat_action = Strategie_parcourir_trajet(trajectoire, step_ms, EVITEMENT_SANS_EVITEMENT); - mise_données_dans_échange((uint8_t*) &(etat_action), sizeof(etat_action), REG_PROPULSION_ETAT_TRJET); + uint8_t etat_action_u8 = etat_action; + mise_données_dans_échange((uint8_t*) &(etat_action_u8), sizeof(etat_action_u8), REG_PROPULSION_ETAT_TRAJET); if(etat_action == ACTION_TERMINEE){ mode = 0; diff --git a/messages_propulsion.h b/messages_propulsion.h index 5988db1..7311bed 100644 --- a/messages_propulsion.h +++ b/messages_propulsion.h @@ -14,7 +14,7 @@ #define REG_PROPULSION_ABSCISSE 0x8C #define REG_PROPULSION_POSITION_CONSIGNE 0x90 #define REG_PROPULSION_VITESSE_ROUES_lecture 0x98 -#define REG_PROPULSION_ETAT_TRJET 0xA0 +#define REG_PROPULSION_ETAT_TRAJET 0xA0 struct msg_propulsion_position_t{ float position_x_mm, position_y_mm, orientation_rad;