code petit robot pour homologation

Fork of CRAC-Strat_2017_V2 by CRAC Team

Committer:
antbig
Date:
Sun Apr 17 14:03:03 2016 +0000
Revision:
4:88431b537477
Parent:
3:19f2285a4757
Child:
7:dcce34c7e06e
Ajout possibilit? de choisir id strat via CAN

Who changed what in which revision?

UserRevisionLine numberNew 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 4:88431b537477 37 /****************************************************************************************/
antbig 4:88431b537477 38 /* FUNCTION NAME: SelectStrategy */
antbig 4:88431b537477 39 /* DESCRIPTION : Charger le fichier de stratégie correspondante à un id */
antbig 4:88431b537477 40 /* RETURN : 0=> Erreur, 1=> OK si le fichier existe */
antbig 4:88431b537477 41 /****************************************************************************************/
antbig 4:88431b537477 42 int SelectStrategy(unsigned char id)
antbig 4:88431b537477 43 {
antbig 4:88431b537477 44 switch(id)
antbig 4:88431b537477 45 {
antbig 4:88431b537477 46 case 1:
antbig 4:88431b537477 47
antbig 4:88431b537477 48 break;
antbig 4:88431b537477 49 }
antbig 4:88431b537477 50 return 0;
antbig 4:88431b537477 51 }
antbig 4:88431b537477 52
antbig 3:19f2285a4757 53 #endif