![](/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: Strategie/Strategie.cpp
- Revision:
- 17:1cf2043c5c01
- Parent:
- 16:c6c765e8b982
- Child:
- 18:746bc235199d
--- a/Strategie/Strategie.cpp Thu Mar 12 09:25:48 2020 +0000 +++ b/Strategie/Strategie.cpp Thu Mar 12 15:39:40 2020 +0000 @@ -2458,39 +2458,7 @@ msgTx.format=CANStandard; msgTx.type=CANData; switch(id) - { - case 109: //goldenium arriere - x=arg1; - y=arg2; - //Send2Short(GOLDENIUM_ARRIERE, x,y); - break; - - /* case 116://relache une pompe - unsigned char arg_tempo; - if(InversStrat == 1) { - switch(arg1) { - case AV_DROIT: - arg_tempo = AV_GAUCHE; - break; - case AV_GAUCHE: - arg_tempo = AV_DROIT; - break; - case AR_DROIT: - arg_tempo = AR_GAUCHE; - break; - case AR_GAUCHE: - arg_tempo = AR_DROIT; - break; - default : - arg_tempo =(unsigned char)arg1; - break; - } - - } else arg_tempo =(unsigned char)arg1; - SendMsgCan(HACHEUR_RELEASE_ATOM, &arg_tempo,1); - waitingAckFrom = 0; - waitingAckID =0; - break;*/ + { case 120: //SendRawId(ACCELERATEUR_INSERTION_AVANT_GAUCHE); break; @@ -2506,7 +2474,6 @@ waitingAckID = 0; break; - case 200 : SendRawId(DATA_TELEMETRE); /*telemetreDistance = dataTelemetre(); @@ -2528,8 +2495,6 @@ waitingAckID =0; break; - - case 20://Désactiver l'asservissement setAsservissementEtat(0); break; @@ -2544,6 +2509,7 @@ waitingAckFrom = 0; waitingAckID = 0; break; + case 23: SendAccel(arg1,(unsigned short)arg2);//,(unsigned short)arg2, (unsigned short)arg2); wait_us(200); @@ -2559,7 +2525,7 @@ waitingAckID =0; break; - //pompe 1 à 6 ON + //gestion des bras (soit on attrape, soit on relache) case 214://test bras competition (attraper) unsigned char argu_at_bras = arg1; @@ -2568,14 +2534,14 @@ waitingAckID =0; break; - case 215://test bras competition(relacher) + case 215: unsigned char argu_re_bras = arg1; SendMsgCan(BRAS_RE, &argu_re_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - - case 216://test ventouses competition (attraper) + //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)); waitingAckFrom = 0; @@ -2592,11 +2558,11 @@ case 218://Action tempo SendRawId(ECUEIL_AVANT_AT); break; - case 219://Action tempo SendRawId(ECUEIL_ARRIERE_AT); break; - case 220: + //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); @@ -2610,4 +2576,4 @@ } return retour;//L'action est spécifique. -} +} \ No newline at end of file