carte_strategie_2019

Dependencies:   mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac

Committer:
antbig
Date:
Tue Apr 26 15:30:54 2016 +0000
Revision:
7:dcce34c7e06e
Parent:
4:88431b537477
Child:
8:0edc7dfb7f7e
D?but du gros robot

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 7:dcce34c7e06e 20 case 101:
antbig 3:19f2285a4757 21
antbig 7:dcce34c7e06e 22 break;
antbig 0:ad97421fb1fb 23 default:
antbig 0:ad97421fb1fb 24 return 0;//L'action n'existe pas, il faut utiliser le CAN
antbig 0:ad97421fb1fb 25
antbig 0:ad97421fb1fb 26 }
antbig 0:ad97421fb1fb 27 return 1;//L'action est spécifique.
antbig 0:ad97421fb1fb 28
antbig 0:ad97421fb1fb 29 }
antbig 0:ad97421fb1fb 30
antbig 0:ad97421fb1fb 31 /****************************************************************************************/
antbig 0:ad97421fb1fb 32 /* FUNCTION NAME: initRobot */
antbig 0:ad97421fb1fb 33 /* DESCRIPTION : initialiser le robot */
antbig 0:ad97421fb1fb 34 /****************************************************************************************/
antbig 0:ad97421fb1fb 35 void initRobot(void) {
antbig 7:dcce34c7e06e 36 AX12_register(1,AX12_SERIAL1);
antbig 7:dcce34c7e06e 37 AX12_register(2,AX12_SERIAL1);
antbig 7:dcce34c7e06e 38 AX12_register(3,AX12_SERIAL1);
antbig 7:dcce34c7e06e 39 AX12_register(4,AX12_SERIAL1);
antbig 7:dcce34c7e06e 40 AX12_register(5,AX12_SERIAL1);
antbig 7:dcce34c7e06e 41 AX12_register(6,AX12_SERIAL1);
antbig 7:dcce34c7e06e 42 AX12_register(7,AX12_SERIAL1);
antbig 7:dcce34c7e06e 43 AX12_register(8,AX12_SERIAL1);
antbig 7:dcce34c7e06e 44 AX12_register(9,AX12_SERIAL1);
antbig 7:dcce34c7e06e 45 AX12_register(11,AX12_SERIAL1);
antbig 7:dcce34c7e06e 46 AX12_register(13,AX12_SERIAL1);
antbig 0:ad97421fb1fb 47 }
antbig 3:19f2285a4757 48
antbig 4:88431b537477 49 /****************************************************************************************/
antbig 4:88431b537477 50 /* FUNCTION NAME: SelectStrategy */
antbig 4:88431b537477 51 /* DESCRIPTION : Charger le fichier de stratégie correspondante à un id */
antbig 4:88431b537477 52 /* RETURN : 0=> Erreur, 1=> OK si le fichier existe */
antbig 4:88431b537477 53 /****************************************************************************************/
antbig 4:88431b537477 54 int SelectStrategy(unsigned char id)
antbig 4:88431b537477 55 {
antbig 4:88431b537477 56 switch(id)
antbig 4:88431b537477 57 {
antbig 4:88431b537477 58 case 1:
antbig 4:88431b537477 59
antbig 4:88431b537477 60 break;
antbig 4:88431b537477 61 }
antbig 4:88431b537477 62 return 0;
antbig 4:88431b537477 63 }
antbig 4:88431b537477 64
antbig 3:19f2285a4757 65 #endif