Biblio à utiliser pour communiquer avec la carte moteur

Dependents:   Asserv_mot Asserv_mot

Committer:
kyxstark
Date:
Mon May 27 09:54:41 2019 +0000
Revision:
2:dc3ec8d77b6a
Parent:
1:162aa6608ffe
v2019

Who changed what in which revision?

UserRevisionLine numberNew contents of line
kkoichy 0:3a1f19e51eb2 1 #ifndef CRAC_ASSERVISSEMENT
kkoichy 0:3a1f19e51eb2 2 #define CRAC_ASSERVISSEMENT
kyxstark 2:dc3ec8d77b6a 3 #include "main.h"
kkoichy 0:3a1f19e51eb2 4
kyxstark 2:dc3ec8d77b6a 5 void Send2Short(unsigned short id, unsigned short d1, unsigned short d2);
kyxstark 2:dc3ec8d77b6a 6 void SendMsgCan(unsigned short id, unsigned char* data, int len);
kyxstark 2:dc3ec8d77b6a 7 void SendCharCan(unsigned short id, unsigned char data);
kkoichy 0:3a1f19e51eb2 8 /*********************************************************************************************************/
kkoichy 0:3a1f19e51eb2 9 /* FUNCTION NAME: SendRawId */
kkoichy 0:3a1f19e51eb2 10 /* DESCRIPTION : Envoie un message sans donnée, c'est-à-dire contenant uniquement un ID, sur le bus CAN */
kkoichy 0:3a1f19e51eb2 11 /*********************************************************************************************************/
kkoichy 0:3a1f19e51eb2 12 void SendRawId (unsigned short id);
kkoichy 0:3a1f19e51eb2 13
kkoichy 0:3a1f19e51eb2 14 /*********************************************************************************************/
kkoichy 0:3a1f19e51eb2 15 /* FUNCTION NAME: SendAck */
kkoichy 0:3a1f19e51eb2 16 /* DESCRIPTION : Envoyer un acknowledge */
kkoichy 0:3a1f19e51eb2 17 /*********************************************************************************************/
kkoichy 0:3a1f19e51eb2 18 void SendAck(unsigned short id, unsigned short from);
kkoichy 0:3a1f19e51eb2 19
kkoichy 0:3a1f19e51eb2 20 /*********************************************************************************************/
kkoichy 0:3a1f19e51eb2 21 /* FUNCTION NAME: GoToPosition */
kkoichy 0:3a1f19e51eb2 22 /* DESCRIPTION : Transmission CAN correspondant à un asservissement en position (x,y,theta) */
kkoichy 0:3a1f19e51eb2 23 /*********************************************************************************************/
kkoichy 0:3a1f19e51eb2 24
kkoichy 0:3a1f19e51eb2 25 void GoToPosition (unsigned short x,unsigned short y,signed short theta,signed char sens);
kkoichy 0:3a1f19e51eb2 26
kkoichy 0:3a1f19e51eb2 27 /****************************************************************************************/
kkoichy 0:3a1f19e51eb2 28 /* FUNCTION NAME: Rotate */
kkoichy 0:3a1f19e51eb2 29 /* DESCRIPTION : Transmission CAN correspondant à une rotation */
kkoichy 0:3a1f19e51eb2 30 /****************************************************************************************/
kkoichy 0:3a1f19e51eb2 31
kkoichy 0:3a1f19e51eb2 32 void Rotate (signed short angle);
kkoichy 0:3a1f19e51eb2 33
kkoichy 0:3a1f19e51eb2 34 /*********************************************************************************************/
kkoichy 0:3a1f19e51eb2 35 /* FUNCTION NAME: GoStraight */
kkoichy 0:3a1f19e51eb2 36 /* DESCRIPTION : Transmission CAN correspondant à une ligne droite, avec ou sans recalage */
kkoichy 0:3a1f19e51eb2 37 /* recalage : 0 => pas de recalage */
kkoichy 0:3a1f19e51eb2 38 /* 1 => recalage en X */
kkoichy 0:3a1f19e51eb2 39 /* 2 => Recalage en Y */
kkoichy 0:3a1f19e51eb2 40 /* newValue : Uniquement en cas de recalage, indique la nouvelle valeur de l'odo */
kkoichy 0:3a1f19e51eb2 41 /* isEnchainement : Indique si il faut executer l'instruction en enchainement */
kkoichy 0:3a1f19e51eb2 42 /* 0 => non */
kkoichy 0:3a1f19e51eb2 43 /* 1 => oui */
kkoichy 0:3a1f19e51eb2 44 /* 2 => dernière instruction de l'enchainement */
kkoichy 0:3a1f19e51eb2 45 /*********************************************************************************************/
kkoichy 0:3a1f19e51eb2 46 void GoStraight (signed short distance,unsigned char recalage, unsigned short newValue, unsigned char isEnchainement);
kkoichy 0:3a1f19e51eb2 47
kkoichy 0:3a1f19e51eb2 48 /********************************************************************************************/
kkoichy 0:3a1f19e51eb2 49 /* FUNCTION NAME: BendRadius */
kkoichy 0:3a1f19e51eb2 50 /* DESCRIPTION : Transmission CAN correspondant à un rayon de courbure */
kkoichy 0:3a1f19e51eb2 51 /********************************************************************************************/
kkoichy 0:3a1f19e51eb2 52 void BendRadius (unsigned short rayon,signed short angle,signed char sens, unsigned char enchainement);
kkoichy 0:3a1f19e51eb2 53
kkoichy 0:3a1f19e51eb2 54 void SetOdometrie (unsigned short canId, unsigned short x,unsigned short y,signed short theta);
kkoichy 0:3a1f19e51eb2 55
kkoichy 0:3a1f19e51eb2 56 /****************************************************************************************/
kkoichy 0:3a1f19e51eb2 57 /* FUNCTION NAME: setAsservissementEtat */
kkoichy 0:3a1f19e51eb2 58 /* DESCRIPTION : Activer ou désactiver l'asservissement */
kkoichy 0:3a1f19e51eb2 59 /****************************************************************************************/
kkoichy 0:3a1f19e51eb2 60 void setAsservissementEtat(unsigned char enable);
kkoichy 0:3a1f19e51eb2 61
kkoichy 0:3a1f19e51eb2 62 /****************************************************************************************/
kkoichy 0:3a1f19e51eb2 63 /* FUNCTION NAME: SendSpeed */
kkoichy 0:3a1f19e51eb2 64 /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */
kkoichy 0:3a1f19e51eb2 65 /****************************************************************************************/
kyxstark 2:dc3ec8d77b6a 66 void SendSpeed (unsigned short vitesse);
kyxstark 2:dc3ec8d77b6a 67 void SendSpeedAccelDecel (unsigned short vitesse, unsigned short acceleration,unsigned short deceleration)
kyxstark 2:dc3ec8d77b6a 68 void SendAccel(unsigned short acceleration,unsigned short deceleration)
Brand101 1:162aa6608ffe 69
kkoichy 0:3a1f19e51eb2 70 #endif