ident leo

Dependents:   carte_straegie_2019 Carte_Pompe_V2 carte_esclave201_petit_rob CRAC-Strat_2019 ... more

ID CAN 2019

Committer:
kyxstark
Date:
Wed May 22 09:19:04 2019 +0000
Revision:
3:5d8692c71146
Parent:
2:9ab15ac5855b
Child:
4:6769b20ff998
merge c

Who changed what in which revision?

UserRevisionLine numberNew contents of line
marwanesaich 1:97f9d943a6aa 1 #ifndef CRAC_IDENTH
marwanesaich 1:97f9d943a6aa 2 #define CRAC_IDENTH
marwanesaich 1:97f9d943a6aa 3
kyxstark 3:5d8692c71146 4 //------------------------------------sellection Robot---------------------
kyxstark 3:5d8692c71146 5 #define ROBOT_BIG //Si commenté Petit Robot, si Décommenter Gros Robot
kyxstark 3:5d8692c71146 6
kyxstark 3:5d8692c71146 7 #ifndef ROBOT_BIG // !!!!!!!! ne pas commenter
kyxstark 3:5d8692c71146 8 #define ROBOT_SMALL // !!!!!!!! ne pas commenter
kyxstark 3:5d8692c71146 9 #endif // !!!!!!!! ne pas commenter
marwanesaich 1:97f9d943a6aa 10
kyxstark 3:5d8692c71146 11 //-------------------------------------------------------------------------
kyxstark 3:5d8692c71146 12
Ganstrich 0:63cf4d3a2ff9 13 #define GLOBAL_GAME_END 0x004 // Stop fin du match
Ganstrich 0:63cf4d3a2ff9 14 #define GLOBAL_START 0x002 // Start
Ganstrich 0:63cf4d3a2ff9 15 #define GLOBAL_END_INIT_POSITION 0x005 // Fin positionnement robot avant depart
Ganstrich 0:63cf4d3a2ff9 16 #define GLOBAL_FUNNY_ACTION 0x007 // Funny action start (0: start, 1: stop)
marwanesaich 1:97f9d943a6aa 17 #define GLOBAL_JACK 0x008
marwanesaich 1:97f9d943a6aa 18 #define ACKNOWLEDGE_JACK 0X009
marwanesaich 1:97f9d943a6aa 19
marwanesaich 1:97f9d943a6aa 20 #define BALISE_STOP 0x003 // Trame stop
marwanesaich 1:97f9d943a6aa 21
marwanesaich 1:97f9d943a6aa 22 #define BALISE_DANGER 0xA // Trame danger
marwanesaich 1:97f9d943a6aa 23
Ganstrich 0:63cf4d3a2ff9 24 #define BALISE_END_DANGER 0xB // Trame fin de danger
marwanesaich 1:97f9d943a6aa 25
marwanesaich 1:97f9d943a6aa 26
Ganstrich 0:63cf4d3a2ff9 27 #define ASSERVISSEMENT_STOP 0x001 // Stop moteur
Ganstrich 0:63cf4d3a2ff9 28 #define ASSERVISSEMENT_SPEED_DANGER 0x006 // Vitesse de danger
Ganstrich 0:63cf4d3a2ff9 29 #define ASSERVISSEMENT_XYT 0x020 // Asservissement (x,y,theta) (0 : au choix 1 : avant -1 : arrière)
Ganstrich 0:63cf4d3a2ff9 30 #define ASSERVISSEMENT_COURBURE 0x021 // Asservissement rayon de courbure (+ gauche, - droite , sens : 1avt , -1arr; enchainement => 1 oui, 0 => non, 2=>derniére instruction de l'enchainement)
Ganstrich 0:63cf4d3a2ff9 31 #define ASSERVISSEMENT_CONFIG 0x022 // Asservissement paramètre (définir les valeurs de vitesse max et d'eccélération max)
Ganstrich 0:63cf4d3a2ff9 32 #define ASSERVISSEMENT_ROTATION 0x023 // Asservissement rotation
Ganstrich 0:63cf4d3a2ff9 33 #define ASSERVISSEMENT_RECALAGE 0x024 // Moteur tout droit (recalage : 0 mouvement seul, 1 x, 2y valeur : coordonnée à laquelle est recalé x/y; enchainement => 1 oui, 0 => non)
marwanesaich 1:97f9d943a6aa 34 #define ACTION_BIG_DEMARRAGE 0x025 // Action de départ du GR (Lancement de la trajectoire de départ du GR)
Ganstrich 0:63cf4d3a2ff9 35 #define ODOMETRIE_BIG_POSITION 0x026 // Odométrie position robot (Position actuel du robot)
Ganstrich 0:63cf4d3a2ff9 36 #define ODOMETRIE_BIG_VITESSE 0x027 // Odométrie vitesse (Indication sur l'état actuel)
Ganstrich 0:63cf4d3a2ff9 37 #define ODOMETRIE_SMALL_POSITION 0x028 // Odométrie position robot (Position actuel du robot)
Ganstrich 0:63cf4d3a2ff9 38 #define ODOMETRIE_SMALL_VITESSE 0x029 // Odométrie vitesse (Indication sur l'état actuel)
marwanesaich 1:97f9d943a6aa 39
marwanesaich 1:97f9d943a6aa 40
marwanesaich 1:97f9d943a6aa 41
marwanesaich 1:97f9d943a6aa 42 #define ASSERVISSEMENT_CONFIG_DECEL 0x019 // Asservissement paramètre (définir les valeurs de vitesse max et de decélération max)
marwanesaich 1:97f9d943a6aa 43
marwanesaich 1:97f9d943a6aa 44
marwanesaich 1:97f9d943a6aa 45 //////////////////////////////////////////////////////////RESETS///////////////////////////////////////////////////
Ganstrich 0:63cf4d3a2ff9 46 #define RESET_BALISE 0x030 // Reset balise
Ganstrich 0:63cf4d3a2ff9 47 #define RESET_MOTEUR 0x031 // Reset moteur
Ganstrich 0:63cf4d3a2ff9 48 #define RESET_IHM 0x032 // Reset écran tactile
Ganstrich 0:63cf4d3a2ff9 49 #define RESET_ACTIONNEURS 0x033 // Reset actionneurs
marwanesaich 1:97f9d943a6aa 50 #define RESET_POMPES 0x034 // Reset pompes
marwanesaich 1:97f9d943a6aa 51 #define RESET_AX12 0x035 // Reset AX12
marwanesaich 1:97f9d943a6aa 52 #define RESET_TELEMETRE 0x036 // Reset telemetre
marwanesaich 1:97f9d943a6aa 53
marwanesaich 1:97f9d943a6aa 54
marwanesaich 1:97f9d943a6aa 55
Ganstrich 0:63cf4d3a2ff9 56 #define RESET_STRAT 0x3A // Reset stratégie
marwanesaich 1:97f9d943a6aa 57
marwanesaich 1:97f9d943a6aa 58 //////////////////////////////////////////////////////////CHECK CARTES/////////////////////////////////////////////////
Ganstrich 0:63cf4d3a2ff9 59 #define CHECK_BALISE 0x060 // Check balise
Ganstrich 0:63cf4d3a2ff9 60 #define CHECK_MOTEUR 0x061 // Check moteur
Ganstrich 0:63cf4d3a2ff9 61 #define CHECK_IHM 0x062 // Check écran tactile
marwanesaich 1:97f9d943a6aa 62 #define CHECK_ACTIONNEURS_AVANT 0x063 // Check actionneurs
marwanesaich 1:97f9d943a6aa 63 #define CHECK_ACTIONNEURS_ARRIERE 0x064 // Check pompes
marwanesaich 1:97f9d943a6aa 64 #define CHECK_AX12 0x065 // Check AX12
marwanesaich 1:97f9d943a6aa 65 #define CHECK_OK_TELEMETRE 0x066 // Check telemetre
marwanesaich 1:97f9d943a6aa 66
marwanesaich 1:97f9d943a6aa 67 //////////////////////////////////////////////////////////ACK CARTES///////////////////////////////////////////////////
Ganstrich 0:63cf4d3a2ff9 68 #define ALIVE_BALISE 0x070 // Alive balise
Ganstrich 0:63cf4d3a2ff9 69 #define ALIVE_MOTEUR 0x071 // Alive moteur
Ganstrich 0:63cf4d3a2ff9 70 #define ALIVE_IHM 0x072 // Alive écran tactile
marwanesaich 1:97f9d943a6aa 71 #define ALIVE_ACTIONNEURS_AVANT 0x073 // Alive actionneurs
marwanesaich 1:97f9d943a6aa 72 #define ALIVE_ACTIONNEURS_ARRIERE 0x074 // Alive pompes
marwanesaich 1:97f9d943a6aa 73 #define ALIVE_AX12 0x075 // Alive AX12
marwanesaich 1:97f9d943a6aa 74 #define ALIVE_TELEMETRE 0x076 // Alive telemetre
marwanesaich 1:97f9d943a6aa 75
marwanesaich 1:97f9d943a6aa 76
marwanesaich 1:97f9d943a6aa 77 /////////////////////////////////////////////////////ACTIONS COMPLEXES/////////////////////////////////////////////////
marwanesaich 1:97f9d943a6aa 78 #define MONTER_IMMEUBLE_DOUBLE 0x090 // Monte deux immeubles selon un code couleur
marwanesaich 1:97f9d943a6aa 79 #define MONTER_IMMEUBLE 0x091
marwanesaich 1:97f9d943a6aa 80 #define ACK_ACTION 0x99 //autre action possible via les herkulex, ne peut pas passer en sendrawid
marwanesaich 1:97f9d943a6aa 81
marwanesaich 1:97f9d943a6aa 82
marwanesaich 1:97f9d943a6aa 83
marwanesaich 1:97f9d943a6aa 84 /////////////////////////////////////////////////////////ACKS////////////////////////////////////////////////////////////
Ganstrich 0:63cf4d3a2ff9 85 #define ACKNOWLEDGE_BALISE 0x100 // Acknowledge balise
Ganstrich 0:63cf4d3a2ff9 86 #define ACKNOWLEDGE_MOTEUR 0x101 // Acknowledge moteur
Ganstrich 0:63cf4d3a2ff9 87 #define ACKNOWLEDGE_IHM 0x102 // Acknowledge ecran tactile
Ganstrich 0:63cf4d3a2ff9 88 #define ACKNOWLEDGE_ACTIONNEURS 0x103 // Acknowledge actionneurs
marwanesaich 1:97f9d943a6aa 89 #define ACKNOWLEDGE_POMPES 0x104 // Acknowledge pompes
marwanesaich 1:97f9d943a6aa 90 #define ACKNOWLEDGE_TELEMETRE 0x105 // Acknowledge telemetre
marwanesaich 1:97f9d943a6aa 91 #define ACKNOWLEDGE_HERKULEX 0x106 // Ack ax12
marwanesaich 1:97f9d943a6aa 92 #define ACKNOWLEDGE_STRAT 0x10A // Acknowledge pompes
marwanesaich 1:97f9d943a6aa 93 #define ACKNOWLEDGE_CAMERA 0x108 //Acknowledge couleur caméra
marwanesaich 1:97f9d943a6aa 94
marwanesaich 1:97f9d943a6aa 95
Ganstrich 0:63cf4d3a2ff9 96 #define INSTRUCTION_END_BALISE 0x110 // Fin instruction balise (Indique que l'instruction est terminée)
Ganstrich 0:63cf4d3a2ff9 97 #define INSTRUCTION_END_MOTEUR 0x111 // Fin instruction moteur (Indique que l'instruction est terminée)
Ganstrich 0:63cf4d3a2ff9 98 #define INSTRUCTION_END_IHM 0x112 // Fin instruction ecran tactile (Indique que l'instruction est terminée)
Ganstrich 0:63cf4d3a2ff9 99 #define INSTRUCTION_END_ACTIONNEURS 0x113 // Fin instruction actionneurs (Indique que l'instruction est terminée)
marwanesaich 1:97f9d943a6aa 100 #define ACK_FIN_ACTION 0x116
marwanesaich 1:97f9d943a6aa 101
marwanesaich 1:97f9d943a6aa 102
marwanesaich 1:97f9d943a6aa 103
marwanesaich 1:97f9d943a6aa 104 /////////////////////////////////////////////////////////ERREURS////////////////////////////////////////////////////////
Ganstrich 0:63cf4d3a2ff9 105 #define ERROR_OVERFLOW_BALISE 0x040 // Overflow odométrie
Ganstrich 0:63cf4d3a2ff9 106 #define ERROR_OVERFLOW_MOTEUR 0x041 // Overflow asservissement
Ganstrich 0:63cf4d3a2ff9 107 #define ERROR_OVERFLOW_IHM 0x042 // Overflow balise
Ganstrich 0:63cf4d3a2ff9 108 #define ERROR_OVERFLOW_STRAT 0x043 // Overflow stratégie
Ganstrich 0:63cf4d3a2ff9 109 #define ERROR_BALISE 0x785 // Bug balise
Ganstrich 0:63cf4d3a2ff9 110 #define ERROR_RTC 0x786 // Bug RTC
Ganstrich 0:63cf4d3a2ff9 111 #define ERROR_MOTEUR 0x787 // Bug moteur
Ganstrich 0:63cf4d3a2ff9 112 #define ERROR_TELEMETRIE 0x788 // Bug télémètre
Ganstrich 0:63cf4d3a2ff9 113 #define ERROR_STRATEGIE 0x789 // Bug stratégie
marwanesaich 1:97f9d943a6aa 114
marwanesaich 1:97f9d943a6aa 115
marwanesaich 1:97f9d943a6aa 116
marwanesaich 1:97f9d943a6aa 117 /////////////////////////////////////////////////ACTIONS SIMPLES DU ROBOT/////////////////////////////////////////////
marwanesaich 1:97f9d943a6aa 118 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Artiom 2:9ab15ac5855b 119 #define GABARIT_PETIT_ROBOT 0x200
Artiom 2:9ab15ac5855b 120
Artiom 2:9ab15ac5855b 121 #define PRESENTOIR_AVANT 0x201
Artiom 2:9ab15ac5855b 122 #define PRESENTOIR_ARRIERE 0x202
Artiom 2:9ab15ac5855b 123
Artiom 2:9ab15ac5855b 124 #define BALANCE_AVANT 0x203
Artiom 2:9ab15ac5855b 125 #define BALANCE_ARRIERE 0x204
Artiom 2:9ab15ac5855b 126
Artiom 2:9ab15ac5855b 127 #define ACCELERATEUR_AVANT 0x205
Artiom 2:9ab15ac5855b 128 #define ACCELERATEUR_ARRIERE 0x206
Artiom 2:9ab15ac5855b 129
Artiom 2:9ab15ac5855b 130 #define GOLDENIUM_AVANT 0x207
Artiom 2:9ab15ac5855b 131 #define GOLDENIUM_ARRIERE 0x208
Artiom 2:9ab15ac5855b 132
Artiom 2:9ab15ac5855b 133 #define SOL_AVANT 0x209
Artiom 2:9ab15ac5855b 134 #define SOL_ARRIERE 0x210
Artiom 2:9ab15ac5855b 135
Artiom 2:9ab15ac5855b 136 #define SOL_AVANT_RELACHE 0x211
Artiom 2:9ab15ac5855b 137 #define SOL_ARRIERE_RELACHE 0x212
Artiom 2:9ab15ac5855b 138
Artiom 2:9ab15ac5855b 139 #define AVANT_RELACHE 0x213
Artiom 2:9ab15ac5855b 140 #define ARRIERE_RELACHE 0x214
Artiom 2:9ab15ac5855b 141
Artiom 2:9ab15ac5855b 142 #define RECROQUEVILLER 0x215
Artiom 2:9ab15ac5855b 143
Artiom 2:9ab15ac5855b 144 #define VENTOUSE_AV_CENTRE_BALANCE 0x216
Artiom 2:9ab15ac5855b 145 #define VENTOUSE_AR_CENTRE_BALANCE 0x217
Artiom 2:9ab15ac5855b 146
Artiom 2:9ab15ac5855b 147
Artiom 2:9ab15ac5855b 148
marwanesaich 1:97f9d943a6aa 149 ///////////////////////////////////////////CAPTEURS///////////////////////////////////////////////////////////////////
Artiom 2:9ab15ac5855b 150 #define DATA_TELEMETRE 0x310 // Demande sa valeur à un télémètre parmis les
Artiom 2:9ab15ac5855b 151 #define RECEPTION_DATA 0x311 // envoi de la valeur d'un des télémètres
Artiom 2:9ab15ac5855b 152 #define TELEMETRE_OBJET 0x312
Artiom 2:9ab15ac5855b 153 #define OBJET_SUR_TABLE 0x313
Artiom 2:9ab15ac5855b 154 #define RECEPTION_RECALAGE 0x315 //Valeur des télémètres
Artiom 2:9ab15ac5855b 155 #define DATA_RECALAGE 0x316 //Demande de la valeur de tous les télémètres afin de procèder au récalage
Artiom 2:9ab15ac5855b 156 #define LIRE_PANNEAU 0x317
Artiom 2:9ab15ac5855b 157 #define VIBRO 0x318
marwanesaich 1:97f9d943a6aa 158 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
kyxstark 3:5d8692c71146 159
kyxstark 3:5d8692c71146 160
kyxstark 3:5d8692c71146 161
marwanesaich 1:97f9d943a6aa 162 ///////////////////////////////////////////////////ENVOI DE PARAMETRES//////////////////////////////////////////////////
marwanesaich 1:97f9d943a6aa 163 #define CHOICE_COLOR 0x602 // Couleur (0->VERT;1->ORANGE)
marwanesaich 1:97f9d943a6aa 164 #define RECEPTION_COULEUR 0x603 //Code Couleur
marwanesaich 1:97f9d943a6aa 165 #define ECRAN_ALL_CHECK 0x620 // Carte all check (Si provient de carte strat => toutes les cartes sont en ligne, Si provient IHM => forcer le lancement)
marwanesaich 1:97f9d943a6aa 166
marwanesaich 1:97f9d943a6aa 167 ///////////////////////////////////////////////////////////DEBUGS///////////////////////////////////////////////////////
Ganstrich 0:63cf4d3a2ff9 168 #define DEBUG_STRATEGIE_AUTOMATE 0x760 // Etat automate stratégie (Permet de savoir l'etat de l'automate)
Ganstrich 0:63cf4d3a2ff9 169 #define DEBUG_FAKE_JAKE 0x761 // Fake jack (Permet d'outre passerr le JACk du robot)
Ganstrich 0:63cf4d3a2ff9 170 #define DEBUG_ASSERV 0x762 // Info debug carte moteur
marwanesaich 1:97f9d943a6aa 171
marwanesaich 1:97f9d943a6aa 172
marwanesaich 1:97f9d943a6aa 173
marwanesaich 1:97f9d943a6aa 174 #define POMPE_PWM 0x9A // pwm des pompes (pwm entre 0 et 100)
marwanesaich 1:97f9d943a6aa 175
marwanesaich 1:97f9d943a6aa 176
kyxstark 3:5d8692c71146 177
kyxstark 3:5d8692c71146 178
kyxstark 3:5d8692c71146 179 ///////////////////////////////Carte Hacheur////////////////////////////////////
kyxstark 3:5d8692c71146 180
kyxstark 3:5d8692c71146 181 #define HACHEUR_GET_ATOM 0x520
kyxstark 3:5d8692c71146 182 #define HACHEUR_GET_ATOM_ACK 0x521
kyxstark 3:5d8692c71146 183 #define HACHEUR_RELEASE_ATOM 0x522
kyxstark 3:5d8692c71146 184 #define HACHEUR_RELEASE_ATOM_ACK 0x523
kyxstark 3:5d8692c71146 185 #define HACHEUR_GET_PRESENTOIR_AV 0x524
kyxstark 3:5d8692c71146 186 #define HACHEUR_RELEASE_AV 0x525
kyxstark 3:5d8692c71146 187 #define HACHEUR_GET_PRESENTOIR_AR 0x526
kyxstark 3:5d8692c71146 188 #define HACHEUR_RELEASE_AR 0x527
kyxstark 3:5d8692c71146 189 #define HACHEUR_STATUT_VENTOUSES 0x528
kyxstark 3:5d8692c71146 190
kyxstark 3:5d8692c71146 191 #define ETAT_COUROIES 0x600 //data 0 : 1 ou 0 allumer éteindre
kyxstark 3:5d8692c71146 192
kyxstark 3:5d8692c71146 193 #define AV_BAS 0
kyxstark 3:5d8692c71146 194 #define AV_DROIT 1
kyxstark 3:5d8692c71146 195 #define AV_CENTRE 2
kyxstark 3:5d8692c71146 196 #define AV_GAUCHE 3
kyxstark 3:5d8692c71146 197
kyxstark 3:5d8692c71146 198 #define AR_BAS 4
kyxstark 3:5d8692c71146 199 #define AR_DROIT 5
kyxstark 3:5d8692c71146 200 #define AR_CENTRE 6
kyxstark 3:5d8692c71146 201 #define AR_GAUCHE 7
kyxstark 3:5d8692c71146 202
kyxstark 3:5d8692c71146 203 #define PGR_DROIT 0
kyxstark 3:5d8692c71146 204 #define PGR_CENTRE 1
kyxstark 3:5d8692c71146 205 #define PGR_GAUCHE 2
kyxstark 3:5d8692c71146 206
kyxstark 3:5d8692c71146 207
kyxstark 3:5d8692c71146 208 ////////////////////////////////////////////////////////////////////////////////
kyxstark 3:5d8692c71146 209
kyxstark 3:5d8692c71146 210
kyxstark 3:5d8692c71146 211
kyxstark 3:5d8692c71146 212
kyxstark 3:5d8692c71146 213
marwanesaich 1:97f9d943a6aa 214 #define ASSERVISSEMENT_INFO_CONSIGNE 0x1F0 // Info Consigne et Commande moteur
marwanesaich 1:97f9d943a6aa 215 #define ASSERVISSEMENT_CONFIG_KPP_DROITE 0x1F1 // Config coef KPP_Droit
marwanesaich 1:97f9d943a6aa 216 #define ASSERVISSEMENT_CONFIG_KPI_DROITE 0x1F2 // Config coef KPI_Droit
marwanesaich 1:97f9d943a6aa 217 #define ASSERVISSEMENT_CONFIG_KPD_DROITE 0x1F3 // Config coef KPD_Droit
marwanesaich 1:97f9d943a6aa 218 #define ASSERVISSEMENT_CONFIG_KPP_GAUCHE 0x1F4 // Config coef KPP_Gauche
marwanesaich 1:97f9d943a6aa 219 #define ASSERVISSEMENT_CONFIG_KPI_GAUCHE 0x1F5 // Config coef KPI_Gauche
marwanesaich 1:97f9d943a6aa 220 #define ASSERVISSEMENT_CONFIG_KPD_GAUCHE 0x1F6 // Config coef KPD_Gauche
marwanesaich 1:97f9d943a6aa 221 #define ASSERVISSEMENT_ENABLE 0x1F7 // Activation asservissement (0 : désactivation, 1 : activation)
marwanesaich 1:97f9d943a6aa 222
marwanesaich 1:97f9d943a6aa 223 #endif
marwanesaich 1:97f9d943a6aa 224