![](/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:
- 16:c6c765e8b982
- Parent:
- 15:5ece9c3ba389
- Child:
- 17:1cf2043c5c01
diff -r 5ece9c3ba389 -r c6c765e8b982 Strategie/Strategie.cpp --- a/Strategie/Strategie.cpp Wed Mar 11 16:35:39 2020 +0000 +++ b/Strategie/Strategie.cpp Thu Mar 12 09:25:48 2020 +0000 @@ -550,11 +550,12 @@ } else if(TEST_NUM.Touched()) { while (TEST_NUM.Touched()); TEST_NUM.Draw(BLEU, BLANC); - Debug_Audio(3,maximilien); + Debug_ + Audio(3,maximilien); } else if(TEST_PLUS.Touched()) { while (TEST_PLUS.Touched()); TEST_PLUS.Draw(BLEU, BLANC); - if(maximilien!=10)maximilien++; + if(maximilien!=20)maximilien++; sprintf(toto,"%hd",maximilien); lcd.SetBackColor(LCD_COLOR_WHITE); lcd.SetTextColor(LCD_COLOR_BLACK); @@ -2458,87 +2459,12 @@ msgTx.type=CANData; switch(id) { - case 101: //bras avant droit - SendRawId(TEST_BRAS_1_AT); - break; - case 102: //bras avant millieu - SendRawId(TEST_BRAS_2_AT); - break; - case 103: //attraper presentoir arriere - //SendRawId(PRESENTOIR_ARRIERE); - break; - case 104: //balance avant - //SendRawId(BALANCE_AVANT); - break; - case 105: //balance arriere - //SendRawId(BALANCE_ARRIERE); - break; - case 106: //accelerateur avant - //SendRawId(ACCELERATEUR_AVANT); - //distance_recalage=arg1; - //distance_revenir=arg2; - //Send2Short(ACCELERATEUR_AVANT, distance_recalage,distance_revenir); - break; - case 107: //accelerateur arriere - //distance_recalage=arg1; - //distance_revenir=arg2; - //Send2Short(ACCELERATEUR_ARRIERE, distance_recalage,distance_revenir); - break; - case 108: //goldenium avant - //SendRawId(GOLDENIUM_AVANT); - x = arg1; - if(InversStrat == 1) { - y = 3000 - arg2; - } else { - y = arg2; - } - //Send2Short(GOLDENIUM_AVANT, x, y); - break; case 109: //goldenium arriere x=arg1; y=arg2; //Send2Short(GOLDENIUM_ARRIERE, x,y); break; - case 110: //sol avant - //SendRawId(SOL_AVANT); - case 130: //sol avant - SendRawId(TEST_BRAS_1_RE); - break; - case 131: //sol avant - SendRawId(TEST_BRAS_2_RE); - break; - case 132: //sol avant - SendRawId(TEST_BRAS_3_RE); - break; - case 133: //sol avant - SendRawId(TEST_BRAS_4_RE); - break; - case 134: //sol avant - SendRawId(TEST_BRAS_5_RE); - break; - case 135: //sol avant - SendRawId(TEST_BRAS_6_RE); - break; - case 111: //sol arriere - // SendRawId(SOL_ARRIERE); - break; - case 112: //sol avant relache - //SendRawId(SOL_AVANT_RELACHE); - break; - case 113: //sol arriere relache - //SendRawId(SOL_ARRIERE_RELACHE); - break; - case 114://relache les 3 ventouses avants - // SendRawId(AVANT_RELACHE); - break; - case 115://bras avant gauche attraper - SendRawId(TEST_BRAS_3_AT); - break; - - case 116://bras arreiere droit - SendRawId(TEST_BRAS_6_AT); - break; /* case 116://relache une pompe unsigned char arg_tempo; if(InversStrat == 1) { @@ -2565,15 +2491,6 @@ waitingAckFrom = 0; waitingAckID =0; break;*/ - case 117://bras arriere millieu - SendRawId(TEST_BRAS_5_AT); - break; - case 118://bras arriere gauche - SendRawId(TEST_BRAS_4_AT); - break; - case 119: - //SendRawId(VENTOUSE_AR_CENTRE_BALANCE); - break; case 120: //SendRawId(ACCELERATEUR_INSERTION_AVANT_GAUCHE); break; @@ -2641,90 +2558,55 @@ waitingAckFrom = 0; waitingAckID =0; break; - - case 30://Action tempo - wait_ms(arg1); - waitingAckFrom = 0; - waitingAckID = 0; - break; + //pompe 1 à 6 ON - case 202 : - //SendRawId(TEST_VENT_1_ON); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 203 : - //SendRawId(TEST_VENT_2_ON); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 204 : - //SendRawId(TEST_VENT_3_ON); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 205 : - // SendRawId(TEST_VENT_4_ON); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 206 : - // SendRawId(TEST_VENT_5_ON); + + case 214://test bras competition (attraper) + unsigned char argu_at_bras = arg1; + SendMsgCan(BRAS_AT, &argu_at_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - case 207 : - // SendRawId(TEST_VENT_6_ON); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 208 : - // SendRawId(TEST_VENT_1_OFF); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 209 : - //SendRawId(TEST_VENT_2_OFF); + + case 215://test bras competition(relacher) + unsigned char argu_re_bras = arg1; + SendMsgCan(BRAS_RE, &argu_re_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - case 210 : - // SendRawId(TEST_VENT_3_OFF); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 211 : - //SendRawId(TEST_VENT_4_OFF); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 212 : - // SendRawId(TEST_VENT_5_OFF); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 213 : - //SendRawId(TEST_VENT_6_OFF); - waitingAckFrom = 0; - waitingAckID =0; - break; - case 214://test bras competition (avant) - unsigned char argu_at = arg1; - SendMsgCan(BRAS_AT, &argu_at,sizeof(arg1)); + + case 216://test ventouses competition (attraper) + unsigned char argu_at_ventouse = arg1 - 1; + SendMsgCan(VENT_AT, &argu_at_ventouse,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; break; - case 215://test bras competition(arriere) - unsigned char argu_re = arg1; - SendMsgCan(BRAS_RE, &argu_re,sizeof(argu_re)); + case 217://test ventouses competition(relacher) + unsigned char argu_re_ventouse = arg1 - 1; + SendMsgCan(VENT_RE, &argu_re_ventouse,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 220: + unsigned char argu_repertoire = arg1; + unsigned char argu_track = arg2; + Debug_Audio(argu_repertoire, argu_track); + waitingAckFrom = 0; + waitingAckID =0; + break; default: retour = 0;//L'action n'existe pas, il faut utiliser le CAN - + break; } return retour;//L'action est spécifique.