code strat avant match 2, strat inversée OK normalement

Fork of CRAC-Strat_2017_fin_premier_match by CRAC Team

Robots/Strategie_big.cpp

Committer:
antbig
Date:
2016-04-15
Revision:
1:116040d14164
Parent:
0:ad97421fb1fb
Child:
2:8d8e2cf798a3

File content as of revision 1:116040d14164:

#include "StrategieManager.h"

/****************************************************************************************/
/* FUNCTION NAME: doFunnyAction                                                         */
/* DESCRIPTION  : Permet de faire la funny action en fin de partie                      */
/****************************************************************************************/
void doFunnyAction(void) {
    
    
}

/****************************************************************************************/
/* FUNCTION NAME: doAction                                                              */
/* 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
            AX12_setGoal(1,190,0x0FF);
            AX12_processChange();
        break;
        case 102://Remonter bras moiter
            AX12_setGoal(1,260,0x0FF);
            AX12_processChange();
        break;
        case 103://Lacher les poissons
            AX12_setGoal(1,230,0x0FF);
            AX12_setGoal(2,60);//Ouverture du bras
            AX12_processChange();
        break;
        case 104://Rentrer le bras
            AX12_setGoal(1,280,0x0FF);
            AX12_setGoal(2,160);//fermer le bras
            AX12_processChange();
        break;
        default:
            return 0;//L'action n'existe pas, il faut utiliser le CAN
        
    }
    return 1;//L'action est spécifique.
    
}

/****************************************************************************************/
/* FUNCTION NAME: initRobot                                                             */
/* DESCRIPTION  : initialiser le robot                                                  */
/****************************************************************************************/
void initRobot(void) {
    
}