![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
code de la carte IHM avant les bugs et avant le travail effectué avec Melchior
Dependencies: mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait
Diff: Strategie/Strategie.cpp
- Revision:
- 20:2f0b1c48a35f
- Parent:
- 19:e70b9d4a319c
- Child:
- 21:d137ec53c3a9
diff -r e70b9d4a319c -r 2f0b1c48a35f Strategie/Strategie.cpp --- a/Strategie/Strategie.cpp Mon May 25 18:25:20 2020 +0000 +++ b/Strategie/Strategie.cpp Tue Jun 23 13:31:38 2020 +0000 @@ -441,10 +441,10 @@ TEST_NUM.Draw(BLEU, BLANC); switch(maximilien){ case 1: - //SendRawId(TEST_VENT_1); + SendRawId(TEST_VENT_1_ON); break; case 2: - //SendRawId(TEST_VENT_2); + SendRawId(TEST_VENT_1_OFF); break; case 3: //SendRawId(TEST_VENT_3); @@ -2458,7 +2458,14 @@ waitingAckFrom = 0; waitingAckID =0; break; - + + case 19: // CHANGER LA VITESSE + DECELERATION + //SendSpeedDecel(arg1,(unsigned short) arg2); + wait_us(200); + waitingAckFrom = 0; + waitingAckID =0; + break; + case 20://Désactiver l'asservissement setAsservissementEtat(0); break; @@ -2480,59 +2487,62 @@ waitingAckFrom = 0; waitingAckID = 0; break; - - - case 19: // CHANGER LA VITESSE + DECELERATION - //SendSpeedDecel(arg1,(unsigned short) arg2); - wait_us(200); + + case 151: + unsigned char argu_at_1_bras = arg1; + SendMsgCan(BRAS_AT_1, &argu_at_1_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - //gestion des bras (soit on attrape, soit on relache) - - case 214://test bras competition (attraper) - unsigned char argu_at_bras = arg1; - SendMsgCan(BRAS_AT, &argu_at_bras,sizeof(arg1)); + case 152: + unsigned char argu_re_1_bras = arg1; + SendMsgCan(BRAS_RE_1, &argu_re_1_bras,sizeof(arg1)); + waitingAckFrom = 0; + waitingAckID =0; + break; + + case 153: + unsigned char argu_at_2_bras = arg1; + SendMsgCan(BRAS_AT_2, &argu_at_2_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - case 215: - unsigned char argu_re_bras = arg1; - SendMsgCan(BRAS_RE, &argu_re_bras,sizeof(arg1)); + case 154: + unsigned char argu_re_2_bras = arg1; + SendMsgCan(BRAS_RE_2, &argu_re_2_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - //gestion des ventouses (soit on attrape, soit on relache) - case 216: - unsigned char argu_at_ventouse = arg1 - 1; - SendMsgCan(VENT_AT, &argu_at_ventouse,sizeof(arg1)); + + case 155: + unsigned char argu_at_3_bras = arg1; + SendMsgCan(BRAS_AT_3, &argu_at_3_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - case 217://test ventouses competition(relacher) - unsigned char argu_re_ventouse = arg1 - 1; - SendMsgCan(VENT_RE, &argu_re_ventouse,sizeof(arg1)); + case 156: + unsigned char argu_re_3_bras = arg1; + SendMsgCan(BRAS_RE_3, &argu_re_3_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - - case 218://Action tempo - SendRawId(ECUEIL_AVANT_AT); - break; - case 219://Action tempo - SendRawId(ECUEIL_ARRIERE_AT); - break; - //case d'envoie audio afin de jouer un son indépendament d'une action - case 220: - unsigned char argu_repertoire = arg1; - unsigned char argu_track = arg2; - Debug_Audio(argu_repertoire, argu_track); + + case 157: + unsigned char argu_at_vent = arg1; + SendMsgCan(VENT_AT, &argu_at_vent,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; - break; + break; + + case 158: + unsigned char argu_re_vent = arg1; + SendMsgCan(VENT_RE, &argu_re_vent,sizeof(arg1)); + waitingAckFrom = 0; + waitingAckID =0; + break; default: retour = 0;//L'action n'existe pas, il faut utiliser le CAN