PINOUT à jour, trame CAN OK
Dependencies: mbed ident_crac
Code carte pompe
Diff: main.cpp
- Revision:
- 4:82c90657da4a
- Parent:
- 2:4cc8fa2f64be
- Child:
- 5:176e7353ba1c
diff -r 4cc8fa2f64be -r 82c90657da4a main.cpp --- a/main.cpp Tue May 07 13:14:29 2019 +0000 +++ b/main.cpp Wed May 08 17:46:13 2019 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "class_ventouse.h" #include "ident_CRAC.h" +#include "extern.h" #define ROBOT_SMALL @@ -51,32 +52,27 @@ #ifdef ROBOT_SMALL case HACHEUR_GET_ATOM: BRAS = msgRxBuffer[FIFO_lecture].data[0]; - pc.printf("HACHEUR_GET_ATOM bras %d\n", BRAS); ventouse[BRAS]->action(1); break; case HACHEUR_RELEASE_ATOM: BRAS = msgRxBuffer[FIFO_lecture].data[0]; - pc.printf("HACHEUR_RELEASE_ATOM bras %d\n", BRAS); ventouse[BRAS]->action(0); break; - case HACHEUR_GET_PRESENTOIR_AR: - pc.printf("HACHEUR_GET_DISTRIB_AR\n"); + case HACHEUR_GET_PRESENTOIR_AR: ventouse[AR_GAUCHE]->action(1);; ventouse[AR_CENTRE]->action(1);; ventouse[AR_DROIT]->action(1);; break; case HACHEUR_GET_PRESENTOIR_AV : - pc.printf("HACHEUR_GET_DISTRIB_AV\n"); ventouse[AV_GAUCHE]->action(1);; ventouse[AV_CENTRE]->action(1);; ventouse[AV_DROIT]->action(1);; break; case HACHEUR_STATUT_VENTOUSES: - pc.printf("HACHEUR_GET_STATUS\n"); get_etat_ventouses(); break; @@ -104,10 +100,11 @@ ventouse[AV_GAUCHE] = new Ventouse(PB_7, PB_6, PC_0, AV_GAUCHE); ventouse[AV_CENTRE] = new Ventouse(PC_7,PC_8 , PC_5, AV_CENTRE); - ventouse[AV_BAS] = new Ventouse(PB_10, PB_2, PC_4, AV_BAS); - ventouse[AR_GAUCHE] = new Ventouse(PA_6, PA_5, PA_7, AR_GAUCHE); + ventouse[AR_GAUCHE] = new Ventouse(PB_10, PB_2, PC_4, AR_GAUCHE); + ventouse[AV_BAS] = new Ventouse(PA_6, PA_5, PA_7, AV_BAS); ventouse[AV_DROIT] = new Ventouse(PA_0, PA_1, PA_4, AV_DROIT); + #endif pc.printf("LAUNCHED"); while(1) {