![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
carte esclave pompe 2020 V1
Dependencies: mbed ident_crac
Diff: main.cpp
- Revision:
- 20:677dcf689523
- Parent:
- 19:952208276c63
- Child:
- 21:42d6cead9cc2
--- a/main.cpp Thu Mar 05 16:32:21 2020 +0000 +++ b/main.cpp Fri Mar 06 08:17:17 2020 +0000 @@ -56,7 +56,8 @@ int identifiant=msgRxBuffer[FIFO_lecture].id; char BRAS = 0; - switch(identifiant){ + switch(identifiant) + { /*case HACHEUR_GET_ATOM: BRAS = msgRxBuffer[FIFO_lecture].data[0]; @@ -79,50 +80,29 @@ case HACHEUR_ETAT_CONTACTS: char contacts_tmp = contacts; can.write(CANMessage(HACHEUR_ETAT_CONTACTS,&contacts_tmp,1)); - break; - - case HACHEUR_GET_PRESENTOIR_AR: - ventouse[AR_GAUCHE]->action(1); - ventouse[AR_CENTRE]->action(1); - ventouse[AR_DROIT]->action(1); - break; - - case HACHEUR_RELEASE_AR: - ventouse[AR_GAUCHE]->action(0); - ventouse[AR_CENTRE]->action(0); - ventouse[AR_DROIT]->action(0); - break; - - case HACHEUR_GET_PRESENTOIR_AV : - ventouse[AV_GAUCHE]->action(1); - ventouse[AV_CENTRE]->action(1); - ventouse[AV_DROIT]->action(1); - break; - - case HACHEUR_RELEASE_AV : - ventouse[AV_GAUCHE]->action(0); - ventouse[AV_CENTRE]->action(0); - ventouse[AV_DROIT]->action(0); break;*/ case TEST_ELECTROV_1: ventouse[AR_GAUCHE]->action(1); ventouse[AR_CENTRE]->action(1); ventouse[AR_DROIT]->action(1); + break; + + case TEST_ELECTROV_2: ventouse[AV_GAUCHE]->action(1); ventouse[AV_CENTRE]->action(1); ventouse[AV_DROIT]->action(1); break; - case TEST_ELECTROV_2: + case TEST_ELECTROV_3: ventouse[AR_GAUCHE]->action(0); ventouse[AR_CENTRE]->action(0); ventouse[AR_DROIT]->action(0); ventouse[AV_GAUCHE]->action(0); ventouse[AV_CENTRE]->action(0); ventouse[AV_DROIT]->action(0); - break; - } + break; + } FIFO_lecture=(FIFO_lecture+1)%SIZE_FIFO; } }