![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
code avec la sortie d'évitement en plus géré par un ticker, ce code et le code "avec_modifs" buggent en match avec seulement la stratégie agressive.
Dependencies: mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait
Diff: Evitement/Evitement.cpp
- Revision:
- 21:d137ec53c3a9
- Parent:
- 10:1964bb91b925
- Child:
- 37:9d6a3ccc0582
--- a/Evitement/Evitement.cpp Tue Jun 23 13:31:38 2020 +0000 +++ b/Evitement/Evitement.cpp Wed Jun 24 09:39:42 2020 +0000 @@ -73,29 +73,29 @@ /* FUNCTION NAME: Balise end Danger */ /* DESCRIPTION : FIFO -> BALISE_END_DANGER */ /****************************************************************************************/ -unsigned short balise_end_danger(S_Instruction* instruction,S_Dodge_queue* dodgeq, E_stratGameEtat* gameEtat, signed short target_x_robot, signed short target_y_robot, signed short target_theta_robot, signed short theta_robot,signed short x_robot,signed short y_robot){ +unsigned short balise_end_danger(S_Instruction* instruction,S_Dodge_queue* dodgeq, signed short target_x_robot, signed short target_y_robot, signed short target_theta_robot, signed short theta_robot,signed short x_robot,signed short y_robot){ Debug_Audio(3,1); switch(instruction->order){ case MV_LINE: - *gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; + gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; instruction->order = MV_XYT; instruction->arg1 = target_x_robot;// X instruction->arg2 = target_y_robot;// Y instruction->arg3 = target_theta_robot;// T break; case MV_TURN: - *gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; + gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; instruction->order = MV_XYT; instruction->arg1 = target_x_robot;// X instruction->arg2 = target_y_robot;// Y instruction->arg3 = target_theta_robot;// T break; case MV_XYT: - *gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; + gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; break; case MV_COURBURE: unsigned short alpha; - *gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; + gameEtat=ETAT_GAME_PROCESS_INSTRUCTION; instruction->order=MV_XYT; if(instruction->direction==LEFT) alpha=(dodgeq->inst[0].arg3-theta_robot); else alpha=(theta_robot-dodgeq->inst[0].arg3);