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:
- 35:2a745eeb7922
- Parent:
- 33:c54841d11156
- Child:
- 36:c37dbe2be916
diff -r c314feaa0d3e -r 2a745eeb7922 Strategie/Strategie.cpp --- a/Strategie/Strategie.cpp Mon May 17 07:19:15 2021 +0000 +++ b/Strategie/Strategie.cpp Fri May 21 16:19:18 2021 +0000 @@ -101,7 +101,7 @@ unsigned short id_check[NOMBRE_CARTES]= {CHECK_MOTEUR,CHECK_BALISE}; unsigned short id_alive[NOMBRE_CARTES]= {ALIVE_MOTEUR,ALIVE_BALISE}; -InterruptIn jack(PG_11); // entrée numerique en interruption pour le jack +InterruptIn jack(PG_11); // entrée numerique en interruption pour le jack (JackB1 sur la carte esclave) @@ -1613,7 +1613,7 @@ case 151: unsigned char argu_at_bras = arg1; - if(argu_at_bras == 543) argu_at_bras = 66; + if(arg1 == 543) argu_at_bras = 66; SendMsgCan(BRAS_AT, &argu_at_bras,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; @@ -1621,14 +1621,43 @@ case 152: unsigned char argu_re_bras = arg1; - if(argu_re_bras == 543) argu_re_bras = 66; + if(arg1 == 543) argu_re_bras = 66; SendMsgCan(BRAS_RE, &argu_re_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 154: + unsigned char argu_re_2_bras = arg1; + SendMsgCan(BRAS_RE_2, &argu_re_2_bras,sizeof(arg1)); + waitingAckFrom = 0; + waitingAckID =0; + break; + 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 156: + unsigned char argu_re_3_bras = arg1; + SendMsgCan(BRAS_RE_3, &argu_re_3_bras,sizeof(arg1)); + waitingAckFrom = 0; + waitingAckID =0; + break; +*/ case 153: unsigned char argu_at_vent = arg1; + if(arg1 == 543) argu_at_vent = 66; SendMsgCan(VENT_AT, &argu_at_vent,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; @@ -1636,23 +1665,25 @@ case 154: unsigned char argu_re_vent = arg1; + if(arg1 == 543) argu_re_vent = 66; SendMsgCan(VENT_RE, &argu_re_vent,sizeof(arg1)); - wait_ms(500); waitingAckFrom = 0; waitingAckID =0; break; - case 157 : + case 157: + unsigned char argu_manche_bas = arg1; + SendMsgCan(AUTOMATE_MANCHE_BAS, &argu_manche_bas,sizeof(arg1)); + waitingAckFrom = 0; + waitingAckID =0; + break; + + case 158: unsigned char argu_manche_haut = arg1; SendMsgCan(AUTOMATE_MANCHE_HAUT, &argu_manche_haut,sizeof(arg1)); waitingAckFrom = 0; waitingAckID =0; - - case 158 : - unsigned char argu_manche_bas = arg1; - SendMsgCan(AUTOMATE_MANCHE_BAS, &argu_manche_bas,sizeof(arg1)); - waitingAckFrom = 0; - waitingAckID =0; + break; default: retour = 0;//L'action n'existe pas, il faut utiliser le CAN