v2019
Dependencies: CRAC-Strat_2019 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Dependents: Codeprincipal_2019 CRAC-Strat_2019
Diff: Robots/Strategie_big.cpp
- Revision:
- 3:19f2285a4757
- Parent:
- 2:8d8e2cf798a3
- Child:
- 4:88431b537477
--- a/Robots/Strategie_big.cpp Fri Apr 15 16:43:35 2016 +0000 +++ b/Robots/Strategie_big.cpp Sun Apr 17 08:31:59 2016 +0000 @@ -1,4 +1,6 @@ #include "StrategieManager.h" +#ifdef ROBOT_BIG +#include "Config_big.h" /****************************************************************************************/ /* FUNCTION NAME: doFunnyAction */ @@ -14,47 +16,8 @@ /* DESCRIPTION : Effectuer une action specifique */ /****************************************************************************************/ unsigned char doAction(unsigned char id, unsigned short speed, short angle) { - - led1 = 1; - led2 = 1; switch(id) { - case 101://Descendre le bras pour les poissons - if(InversStrat == 1) {//Si c'est inversé - AX12_setGoal(1,200,0x0FF); - AX12_processChange(); - } else { - - } - break; - case 102://Remonter bras moiter - if(InversStrat == 1) {//Si c'est inversé - AX12_setGoal(1,270,0x0FF); - AX12_processChange(); - } else { - - } - break; - case 103://Lacher les poissons - if(InversStrat == 1) {//Si c'est inversé - - AX12_setGoal(1,210,0x0FF); - AX12_processChange(); - wait_ms(500); - AX12_setGoal(2,90);//Ouverture du bras - AX12_processChange(); - } else { - - } - break; - case 104://Rentrer le bras - if(InversStrat == 1) {//Si c'est inversé - AX12_setGoal(1,278,0x0FF); - AX12_setGoal(2,160);//fermer le bras - AX12_processChange(); - } else { - - } - break; + default: return 0;//L'action n'existe pas, il faut utiliser le CAN @@ -70,3 +33,5 @@ void initRobot(void) { } + +#endif