Corrections mineures

This commit is contained in:
Samuel 2026-04-18 18:06:27 +02:00
parent e4f0bb4b61
commit 5eb8625916
2 changed files with 5 additions and 6 deletions

9
main.c
View File

@ -203,11 +203,9 @@ void main(void)
msg_trajectoire.trajectoire.p4.x, msg_trajectoire.trajectoire.p4.y); msg_trajectoire.trajectoire.p4.x, msg_trajectoire.trajectoire.p4.y);
trajectoire = msg_trajectoire.trajectoire; trajectoire = msg_trajectoire.trajectoire;
mode = 4; mode = 4;
enum etat_action_t etat_action = ACTION_EN_COURS; uint8_t etat_action = ACTION_EN_COURS;
mise_données_dans_échange((uint8_t*) &(etat_action), sizeof(etat_action), REG_PROPULSION_ETAT_TRJET); mise_données_dans_échange((uint8_t*) &(etat_action), sizeof(etat_action), REG_PROPULSION_ETAT_TRAJET);
Trajet_config(200, 100); Trajet_config(200, 100);
// Oh la la !
} }
} }
@ -290,7 +288,8 @@ void main(void)
break; break;
case 4: case 4:
etat_action = Strategie_parcourir_trajet(trajectoire, step_ms, EVITEMENT_SANS_EVITEMENT); 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){ if(etat_action == ACTION_TERMINEE){
mode = 0; mode = 0;

View File

@ -14,7 +14,7 @@
#define REG_PROPULSION_ABSCISSE 0x8C #define REG_PROPULSION_ABSCISSE 0x8C
#define REG_PROPULSION_POSITION_CONSIGNE 0x90 #define REG_PROPULSION_POSITION_CONSIGNE 0x90
#define REG_PROPULSION_VITESSE_ROUES_lecture 0x98 #define REG_PROPULSION_VITESSE_ROUES_lecture 0x98
#define REG_PROPULSION_ETAT_TRJET 0xA0 #define REG_PROPULSION_ETAT_TRAJET 0xA0
struct msg_propulsion_position_t{ struct msg_propulsion_position_t{
float position_x_mm, position_y_mm, orientation_rad; float position_x_mm, position_y_mm, orientation_rad;