CAN_Servomoteur_V1_Haoxuan avec lib de servo

Dependencies:   mbed

Committer:
Shanglin
Date:
Thu Apr 12 08:54:49 2018 +0000
Revision:
0:3b683da943e6
CAN_Servo_V1_Haoxuan_avec_lib_servo

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Shanglin 0:3b683da943e6 1 #ifndef CRAC_IDENTH
Shanglin 0:3b683da943e6 2 #define CRAC_IDENTH
Shanglin 0:3b683da943e6 3
Shanglin 0:3b683da943e6 4
Shanglin 0:3b683da943e6 5
Shanglin 0:3b683da943e6 6 #define GLOBAL_GAME_END 0x004 // Stop fin du match
Shanglin 0:3b683da943e6 7 #define GLOBAL_START 0x002 // Start
Shanglin 0:3b683da943e6 8 #define GLOBAL_END_INIT_POSITION 0x005 // Fin positionnement robot avant depart
Shanglin 0:3b683da943e6 9 #define GLOBAL_FUNNY_ACTION 0x007 // Funny action start (0: start, 1: stop)
Shanglin 0:3b683da943e6 10 #define GLOBAL_JACK 0x008
Shanglin 0:3b683da943e6 11 #define ACKNOWLEDGE_JACK 0X009
Shanglin 0:3b683da943e6 12
Shanglin 0:3b683da943e6 13 #define BALISE_STOP 0x003 // Trame stop
Shanglin 0:3b683da943e6 14
Shanglin 0:3b683da943e6 15 #define BALISE_DANGER 0xA // Trame danger
Shanglin 0:3b683da943e6 16
Shanglin 0:3b683da943e6 17 #define BALISE_END_DANGER 0xB // Trame fin de danger
Shanglin 0:3b683da943e6 18
Shanglin 0:3b683da943e6 19
Shanglin 0:3b683da943e6 20 #define ASSERVISSEMENT_STOP 0x001 // Stop moteur
Shanglin 0:3b683da943e6 21 #define ASSERVISSEMENT_SPEED_DANGER 0x006 // Vitesse de danger
Shanglin 0:3b683da943e6 22 #define ASSERVISSEMENT_XYT 0x020 // Asservissement (x,y,theta) (0 : au choix 1 : avant -1 : arrière)
Shanglin 0:3b683da943e6 23 #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)
Shanglin 0:3b683da943e6 24 #define ASSERVISSEMENT_CONFIG 0x022 // Asservissement paramètre (définir les valeurs de vitesse max et d'eccélération max)
Shanglin 0:3b683da943e6 25 #define ASSERVISSEMENT_ROTATION 0x023 // Asservissement rotation
Shanglin 0:3b683da943e6 26 #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)
Shanglin 0:3b683da943e6 27
Shanglin 0:3b683da943e6 28 #define ODOMETRIE_BIG_POSITION 0x026 // Odométrie position robot (Position actuel du robot)
Shanglin 0:3b683da943e6 29 #define ODOMETRIE_BIG_VITESSE 0x027 // Odométrie vitesse (Indication sur l'état actuel)
Shanglin 0:3b683da943e6 30 #define ODOMETRIE_SMALL_POSITION 0x028 // Odométrie position robot (Position actuel du robot)
Shanglin 0:3b683da943e6 31 #define ODOMETRIE_SMALL_VITESSE 0x029 // Odométrie vitesse (Indication sur l'état actuel)
Shanglin 0:3b683da943e6 32 #define ACTION_BIG_DEMARRAGE 0x025 // Action de départ du GR (Lancement de la trajectoire de départ du GR)
Shanglin 0:3b683da943e6 33
Shanglin 0:3b683da943e6 34 #define ASSERVISSEMENT_INFO_CONSIGNE 0x1F0 // Info Consigne et Commande moteur
Shanglin 0:3b683da943e6 35 #define ASSERVISSEMENT_CONFIG_KPP_DROITE 0x1F1 // Config coef KPP_Droit
Shanglin 0:3b683da943e6 36 #define ASSERVISSEMENT_CONFIG_KPI_DROITE 0x1F2 // Config coef KPI_Droit
Shanglin 0:3b683da943e6 37 #define ASSERVISSEMENT_CONFIG_KPD_DROITE 0x1F3 // Config coef KPD_Droit
Shanglin 0:3b683da943e6 38 #define ASSERVISSEMENT_CONFIG_KPP_GAUCHE 0x1F4 // Config coef KPP_Gauche
Shanglin 0:3b683da943e6 39 #define ASSERVISSEMENT_CONFIG_KPI_GAUCHE 0x1F5 // Config coef KPI_Gauche
Shanglin 0:3b683da943e6 40 #define ASSERVISSEMENT_CONFIG_KPD_GAUCHE 0x1F6 // Config coef KPD_Gauche
Shanglin 0:3b683da943e6 41 #define ASSERVISSEMENT_ENABLE 0x1F7 // Activation asservissement (0 : désactivation, 1 : activation)
Shanglin 0:3b683da943e6 42 #define ASSERVISSEMENT_CONFIG_DECEL 0x019 // Asservissement paramètre (définir les valeurs de vitesse max et de decélération max)
Shanglin 0:3b683da943e6 43
Shanglin 0:3b683da943e6 44 #define RESET_BALISE 0x030 // Reset balise
Shanglin 0:3b683da943e6 45 #define RESET_MOTEUR 0x031 // Reset moteur
Shanglin 0:3b683da943e6 46 #define RESET_IHM 0x032 // Reset écran tactile
Shanglin 0:3b683da943e6 47 #define RESET_ACTIONNEURS 0x033 // Reset actionneurs
Shanglin 0:3b683da943e6 48 #define RESET_POMPES 0x034 // Reset pompes
Shanglin 0:3b683da943e6 49 #define RESET_AX12 0x035 // Reset AX12
Shanglin 0:3b683da943e6 50 #define RESET_TELEMETRE 0x036 // Reset telemetre
Shanglin 0:3b683da943e6 51
Shanglin 0:3b683da943e6 52
Shanglin 0:3b683da943e6 53
Shanglin 0:3b683da943e6 54 #define RESET_STRAT 0x3A // Reset stratégie
Shanglin 0:3b683da943e6 55
Shanglin 0:3b683da943e6 56
Shanglin 0:3b683da943e6 57 #define CHECK_BALISE 0x060 // Check balise
Shanglin 0:3b683da943e6 58 #define CHECK_MOTEUR 0x061 // Check moteur
Shanglin 0:3b683da943e6 59 #define CHECK_IHM 0x062 // Check écran tactile
Shanglin 0:3b683da943e6 60 #define CHECK_ACTIONNEURS_AVANT 0x063 // Check actionneurs
Shanglin 0:3b683da943e6 61 #define CHECK_ACTIONNEURS_ARRIERE 0x064 // Check pompes
Shanglin 0:3b683da943e6 62 #define CHECK_AX12 0x065 // Check AX12
Shanglin 0:3b683da943e6 63 #define CHECK_OK_TELEMETRE 0x066 // Check telemetre
Shanglin 0:3b683da943e6 64
Shanglin 0:3b683da943e6 65
Shanglin 0:3b683da943e6 66 #define ALIVE_BALISE 0x070 // Alive balise
Shanglin 0:3b683da943e6 67 #define ALIVE_MOTEUR 0x071 // Alive moteur
Shanglin 0:3b683da943e6 68 #define ALIVE_IHM 0x072 // Alive écran tactile
Shanglin 0:3b683da943e6 69 #define ALIVE_ACTIONNEURS_AVANT 0x073 // Alive actionneurs
Shanglin 0:3b683da943e6 70 #define ALIVE_ACTIONNEURS_ARRIERE 0x074 // Alive pompes
Shanglin 0:3b683da943e6 71 #define ALIVE_AX12 0x075 // Alive AX12
Shanglin 0:3b683da943e6 72 #define ALIVE_TELEMETRE 0x076 // Alive telemetre
Shanglin 0:3b683da943e6 73
Shanglin 0:3b683da943e6 74
Shanglin 0:3b683da943e6 75
Shanglin 0:3b683da943e6 76
Shanglin 0:3b683da943e6 77 #define ACKNOWLEDGE_BALISE 0x100 // Acknowledge balise
Shanglin 0:3b683da943e6 78 #define ACKNOWLEDGE_MOTEUR 0x101 // Acknowledge moteur
Shanglin 0:3b683da943e6 79 #define ACKNOWLEDGE_IHM 0x102 // Acknowledge ecran tactile
Shanglin 0:3b683da943e6 80 #define ACKNOWLEDGE_ACTIONNEURS 0x103 // Acknowledge actionneurs
Shanglin 0:3b683da943e6 81 #define ACKNOWLEDGE_POMPES 0x104 // Acknowledge pompes
Shanglin 0:3b683da943e6 82 #define ACKNOWLEDGE_TELEMETRE 0x105 // Acknowledge telemetre
Shanglin 0:3b683da943e6 83 #define ACKNOWLEDGE_AX12 0x106 // Ack ax12
Shanglin 0:3b683da943e6 84 #define ACKNOWLEDGE_STRAT 0x10A // Acknowledge pompes
Shanglin 0:3b683da943e6 85 #define ACKNOWLEDGE_CAMERA 0x108 //Acknowledge couleur caméra
Shanglin 0:3b683da943e6 86
Shanglin 0:3b683da943e6 87
Shanglin 0:3b683da943e6 88 #define INSTRUCTION_END_BALISE 0x110 // Fin instruction balise (Indique que l'instruction est terminée)
Shanglin 0:3b683da943e6 89 #define INSTRUCTION_END_MOTEUR 0x111 // Fin instruction moteur (Indique que l'instruction est terminée)
Shanglin 0:3b683da943e6 90 #define INSTRUCTION_END_IHM 0x112 // Fin instruction ecran tactile (Indique que l'instruction est terminée)
Shanglin 0:3b683da943e6 91 #define INSTRUCTION_END_ACTIONNEURS 0x113 // Fin instruction actionneurs (Indique que l'instruction est terminée)
Shanglin 0:3b683da943e6 92 #define INSTRUCTION_END_AX12 0x116
Shanglin 0:3b683da943e6 93
Shanglin 0:3b683da943e6 94 #define ECRAN_CHOICE_STRAT 0x601 // Choix d'une stratégie (n° strat (1-4))
Shanglin 0:3b683da943e6 95 #define ECRAN_CHOICE_COLOR 0x602 // Couleur (0->Blue;1->Yellow)
Shanglin 0:3b683da943e6 96 #define ECRAN_START_MATCH 0x603 // Match (Indique que l'on souhaite commencer le match)
Shanglin 0:3b683da943e6 97 #define ECRAN_DEMO_BEGIN 0x604 // Demo (Indique que l'on souhaite faire une demo)
Shanglin 0:3b683da943e6 98 #define ECRAN_ACK_STRAT 0x611 // Acknowledge stratégie (si 0 erreur, sinon n°strat)
Shanglin 0:3b683da943e6 99 #define ECRAN_ACK_COLOR 0x612 // Acknowledge couleur (0->Blue;1->Yellow)
Shanglin 0:3b683da943e6 100 #define ECRAN_ACK_START_MATCH 0x613 // Acknowledge Match (Indique que l'on a bien reçu le debut du match)
Shanglin 0:3b683da943e6 101 #define ECRAN_ACK_DEMO 0x614
Shanglin 0:3b683da943e6 102 #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)
Shanglin 0:3b683da943e6 103 #define ECRAN_TIME 0x621 // Time match (Indication de moment cle du temps (10,30,60,70,80,85,90))
Shanglin 0:3b683da943e6 104 #define ECRAN_PRINTF_1 0x6C0 // Tactile printf (Afficher les 8 permier caractères)
Shanglin 0:3b683da943e6 105 #define ECRAN_PRINTF_2 0x6C1 // Tactile printf (Afficher les 8 second caractères)
Shanglin 0:3b683da943e6 106 #define ECRAN_PRINTF_3 0x6C2 // Tactile printf (Afficher les 8 troisième caractères)
Shanglin 0:3b683da943e6 107 #define ECRAN_PRINTF_4 0x6C3 // Tactile printf (Afficher les 8 quatrième caractères)
Shanglin 0:3b683da943e6 108 #define ECRAN_PRINTF_CLEAR 0x6CF // Tactile printf clear (Permet d'effacer l'ecran)
Shanglin 0:3b683da943e6 109 #define ECRAN_CHOICE_START_ACTION 0x604 // Tactile printf clear (Choisir si il faut lancer le test actionneur)
Shanglin 0:3b683da943e6 110 #define ECRAN_ACK_CHOICE_START_ACTION 0x605 // Tactile printf clear (Ack du test actionneur)
Shanglin 0:3b683da943e6 111
Shanglin 0:3b683da943e6 112 #define ERROR_OVERFLOW_BALISE 0x040 // Overflow odométrie
Shanglin 0:3b683da943e6 113 #define ERROR_OVERFLOW_MOTEUR 0x041 // Overflow asservissement
Shanglin 0:3b683da943e6 114 #define ERROR_OVERFLOW_IHM 0x042 // Overflow balise
Shanglin 0:3b683da943e6 115 #define ERROR_OVERFLOW_STRAT 0x043 // Overflow stratégie
Shanglin 0:3b683da943e6 116 #define ERROR_BALISE 0x785 // Bug balise
Shanglin 0:3b683da943e6 117 #define ERROR_RTC 0x786 // Bug RTC
Shanglin 0:3b683da943e6 118 #define ERROR_MOTEUR 0x787 // Bug moteur
Shanglin 0:3b683da943e6 119 #define ERROR_TELEMETRIE 0x788 // Bug télémètre
Shanglin 0:3b683da943e6 120 #define ERROR_STRATEGIE 0x789 // Bug stratégie
Shanglin 0:3b683da943e6 121
Shanglin 0:3b683da943e6 122 #define DEBUG_STRATEGIE_AUTOMATE 0x760 // Etat automate stratégie (Permet de savoir l'etat de l'automate)
Shanglin 0:3b683da943e6 123 #define DEBUG_FAKE_JAKE 0x761 // Fake jack (Permet d'outre passerr le JACk du robot)
Shanglin 0:3b683da943e6 124 #define DEBUG_ASSERV 0x762 // Info debug carte moteur
Shanglin 0:3b683da943e6 125
Shanglin 0:3b683da943e6 126 //---------------------------------------------------------------------------------------------
Shanglin 0:3b683da943e6 127 #define Monter_immeuble 0x090 // AX12 setGoal (Indiquer la nouvelle position de l'AX12 !! Ne bouge pas) //------------
Shanglin 0:3b683da943e6 128 #define SERVO_AX12_PROCESS 0x091 // AX12 processChange (Lancer le déplacement des AX12)
Shanglin 0:3b683da943e6 129 #define SERVO_AX12_DONE 0x092 // AX12 done (Indique q'un AX12 a terminé son déplacement)
Shanglin 0:3b683da943e6 130 #define SERVO_XL320 0x093 // XL320
Shanglin 0:3b683da943e6 131 #define SERVO_AX12_ACTION 0x96
Shanglin 0:3b683da943e6 132 //---------------------------------------------------------------------------------------------
Shanglin 0:3b683da943e6 133
Shanglin 0:3b683da943e6 134 #define TELEMETRE_RECHERCHE_COIN 0x301
Shanglin 0:3b683da943e6 135 #define TELEMETRE_OBJET 0x302
Shanglin 0:3b683da943e6 136 #define OBJET_SUR_TABLE 0x304
Shanglin 0:3b683da943e6 137
Shanglin 0:3b683da943e6 138 #define POMPE_PWM 0x9A // pwm des pompes (pwm entre 0 et 100)
Shanglin 0:3b683da943e6 139
Shanglin 0:3b683da943e6 140
Shanglin 0:3b683da943e6 141 //////0x400 Plage de la caméra/////
Shanglin 0:3b683da943e6 142 #define RECEPTION_COULEUR 0x401
Shanglin 0:3b683da943e6 143 #endif