code petit robot pour homologation
Fork of CRAC-Strat_2017_V2 by
Robots/Strategie_big.cpp@3:19f2285a4757, 2016-04-17 (annotated)
- Committer:
- antbig
- Date:
- Sun Apr 17 08:31:59 2016 +0000
- Revision:
- 3:19f2285a4757
- Parent:
- 2:8d8e2cf798a3
- Child:
- 4:88431b537477
Mise en place de la s?paration des fonctions doAction, initRobot, doFunnyAction entre les robots dans 2 fichier diff. Il faut modifier le fichier constantes.h pour indiquer le type de robot
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
antbig | 1:116040d14164 | 1 | #include "StrategieManager.h" |
antbig | 3:19f2285a4757 | 2 | #ifdef ROBOT_BIG |
antbig | 3:19f2285a4757 | 3 | #include "Config_big.h" |
antbig | 0:ad97421fb1fb | 4 | |
antbig | 0:ad97421fb1fb | 5 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 6 | /* FUNCTION NAME: doFunnyAction */ |
antbig | 0:ad97421fb1fb | 7 | /* DESCRIPTION : Permet de faire la funny action en fin de partie */ |
antbig | 0:ad97421fb1fb | 8 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 9 | void doFunnyAction(void) { |
antbig | 0:ad97421fb1fb | 10 | |
antbig | 0:ad97421fb1fb | 11 | |
antbig | 0:ad97421fb1fb | 12 | } |
antbig | 0:ad97421fb1fb | 13 | |
antbig | 0:ad97421fb1fb | 14 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 15 | /* FUNCTION NAME: doAction */ |
antbig | 0:ad97421fb1fb | 16 | /* DESCRIPTION : Effectuer une action specifique */ |
antbig | 0:ad97421fb1fb | 17 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 18 | unsigned char doAction(unsigned char id, unsigned short speed, short angle) { |
antbig | 0:ad97421fb1fb | 19 | switch(id) { |
antbig | 3:19f2285a4757 | 20 | |
antbig | 0:ad97421fb1fb | 21 | default: |
antbig | 0:ad97421fb1fb | 22 | return 0;//L'action n'existe pas, il faut utiliser le CAN |
antbig | 0:ad97421fb1fb | 23 | |
antbig | 0:ad97421fb1fb | 24 | } |
antbig | 0:ad97421fb1fb | 25 | return 1;//L'action est spécifique. |
antbig | 0:ad97421fb1fb | 26 | |
antbig | 0:ad97421fb1fb | 27 | } |
antbig | 0:ad97421fb1fb | 28 | |
antbig | 0:ad97421fb1fb | 29 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 30 | /* FUNCTION NAME: initRobot */ |
antbig | 0:ad97421fb1fb | 31 | /* DESCRIPTION : initialiser le robot */ |
antbig | 0:ad97421fb1fb | 32 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 33 | void initRobot(void) { |
antbig | 0:ad97421fb1fb | 34 | |
antbig | 0:ad97421fb1fb | 35 | } |
antbig | 3:19f2285a4757 | 36 | |
antbig | 3:19f2285a4757 | 37 | #endif |