carte esclave Petit Robot
Dependencies: mbed Herkulex_Library_2019 actions_Gr ident_crac actions_Pr
Diff: main.cpp
- Revision:
- 7:553f3f1c2c53
- Parent:
- 6:45f9cf44718a
- Child:
- 9:9833e788942b
diff -r 45f9cf44718a -r 553f3f1c2c53 main.cpp --- a/main.cpp Tue May 14 15:41:32 2019 +0000 +++ b/main.cpp Thu May 16 10:54:23 2019 +0000 @@ -18,6 +18,7 @@ char fpresentoir_avant=0, fpresentoir_arriere=0; char fgoldenium_avant=0, fgoldenium_arriere=0; char fsol_avant=0,fsol_arriere=0; +char fsol_avant_relache=0,fsol_arriere_relache=0; char status_pompe=0; @@ -36,6 +37,8 @@ void automate_ventouse_sol_avant (void); void automate_ventouse_sol_arriere(void); +void automate_ventouse_sol_avant_relache(void); +void automate_ventouse_sol_arriere_relache(void); /*********************************************************************************************/ /* FUNCTION NAME: canRx_ISR */ /* DESCRIPTION : lit les messages sur le can et les stocke dans la FIFO */ @@ -123,12 +126,16 @@ while(1) { canProcessRx(); + automate_ventouse_presentoir_avant(); automate_ventouse_presentoir_arriere(); + automate_ventouse_goldenium_avant(); automate_ventouse_goldenium_arriere(); + automate_ventouse_sol_avant(); - automate_ventouse_sol_arriere(); + automate_ventouse_sol_arriere(); + if(EtatGameEnd==1) { while(1); } @@ -255,15 +262,11 @@ break; case SOL_AVANT_RELACHE: - SendAck(ACKNOWLEDGE_HERKULEX, ACK_ACTION); - sol_avant_relache(); - SendAck(ACKNOWLEDGE_HERKULEX, ACK_FIN_ACTION); + fsol_avant_relache=1; break; case SOL_ARRIERE_RELACHE: - SendAck(ACKNOWLEDGE_HERKULEX, ACK_ACTION); - sol_arriere_relache(); - SendAck(ACKNOWLEDGE_HERKULEX, ACK_FIN_ACTION); + fsol_arriere_relache=1; break; //--------------------------------------------------------------------------ACK carte pompe----------------------------------------------