Biblio à utiliser pour communiquer avec la carte moteur
Dependents: Asserv_mot Asserv_mot
Asservissement.h@1:162aa6608ffe, 2017-04-19 (annotated)
- Committer:
- Brand101
- Date:
- Wed Apr 19 17:41:35 2017 +0000
- Revision:
- 1:162aa6608ffe
- Parent:
- 0:3a1f19e51eb2
- Child:
- 2:dc3ec8d77b6a
B1
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kkoichy | 0:3a1f19e51eb2 | 1 | #ifndef CRAC_ASSERVISSEMENT |
kkoichy | 0:3a1f19e51eb2 | 2 | #define CRAC_ASSERVISSEMENT |
kkoichy | 0:3a1f19e51eb2 | 3 | |
kkoichy | 0:3a1f19e51eb2 | 4 | #include "global.h" |
kkoichy | 0:3a1f19e51eb2 | 5 | |
kkoichy | 0:3a1f19e51eb2 | 6 | /*********************************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 7 | /* FUNCTION NAME: SendRawId */ |
kkoichy | 0:3a1f19e51eb2 | 8 | /* DESCRIPTION : Envoie un message sans donnée, c'est-à-dire contenant uniquement un ID, sur le bus CAN */ |
kkoichy | 0:3a1f19e51eb2 | 9 | /*********************************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 10 | void SendRawId (unsigned short id); |
kkoichy | 0:3a1f19e51eb2 | 11 | |
kkoichy | 0:3a1f19e51eb2 | 12 | /*********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 13 | /* FUNCTION NAME: SendAck */ |
kkoichy | 0:3a1f19e51eb2 | 14 | /* DESCRIPTION : Envoyer un acknowledge */ |
kkoichy | 0:3a1f19e51eb2 | 15 | /*********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 16 | void SendAck(unsigned short id, unsigned short from); |
kkoichy | 0:3a1f19e51eb2 | 17 | |
kkoichy | 0:3a1f19e51eb2 | 18 | /*********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 19 | /* FUNCTION NAME: GoToPosition */ |
kkoichy | 0:3a1f19e51eb2 | 20 | /* DESCRIPTION : Transmission CAN correspondant à un asservissement en position (x,y,theta) */ |
kkoichy | 0:3a1f19e51eb2 | 21 | /*********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 22 | |
kkoichy | 0:3a1f19e51eb2 | 23 | void GoToPosition (unsigned short x,unsigned short y,signed short theta,signed char sens); |
kkoichy | 0:3a1f19e51eb2 | 24 | |
kkoichy | 0:3a1f19e51eb2 | 25 | /****************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 26 | /* FUNCTION NAME: Rotate */ |
kkoichy | 0:3a1f19e51eb2 | 27 | /* DESCRIPTION : Transmission CAN correspondant à une rotation */ |
kkoichy | 0:3a1f19e51eb2 | 28 | /****************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 29 | |
kkoichy | 0:3a1f19e51eb2 | 30 | void Rotate (signed short angle); |
kkoichy | 0:3a1f19e51eb2 | 31 | |
kkoichy | 0:3a1f19e51eb2 | 32 | /*********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 33 | /* FUNCTION NAME: GoStraight */ |
kkoichy | 0:3a1f19e51eb2 | 34 | /* DESCRIPTION : Transmission CAN correspondant à une ligne droite, avec ou sans recalage */ |
kkoichy | 0:3a1f19e51eb2 | 35 | /* recalage : 0 => pas de recalage */ |
kkoichy | 0:3a1f19e51eb2 | 36 | /* 1 => recalage en X */ |
kkoichy | 0:3a1f19e51eb2 | 37 | /* 2 => Recalage en Y */ |
kkoichy | 0:3a1f19e51eb2 | 38 | /* newValue : Uniquement en cas de recalage, indique la nouvelle valeur de l'odo */ |
kkoichy | 0:3a1f19e51eb2 | 39 | /* isEnchainement : Indique si il faut executer l'instruction en enchainement */ |
kkoichy | 0:3a1f19e51eb2 | 40 | /* 0 => non */ |
kkoichy | 0:3a1f19e51eb2 | 41 | /* 1 => oui */ |
kkoichy | 0:3a1f19e51eb2 | 42 | /* 2 => dernière instruction de l'enchainement */ |
kkoichy | 0:3a1f19e51eb2 | 43 | /*********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 44 | void GoStraight (signed short distance,unsigned char recalage, unsigned short newValue, unsigned char isEnchainement); |
kkoichy | 0:3a1f19e51eb2 | 45 | |
kkoichy | 0:3a1f19e51eb2 | 46 | /********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 47 | /* FUNCTION NAME: BendRadius */ |
kkoichy | 0:3a1f19e51eb2 | 48 | /* DESCRIPTION : Transmission CAN correspondant à un rayon de courbure */ |
kkoichy | 0:3a1f19e51eb2 | 49 | /********************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 50 | void BendRadius (unsigned short rayon,signed short angle,signed char sens, unsigned char enchainement); |
kkoichy | 0:3a1f19e51eb2 | 51 | |
kkoichy | 0:3a1f19e51eb2 | 52 | void SetOdometrie (unsigned short canId, unsigned short x,unsigned short y,signed short theta); |
kkoichy | 0:3a1f19e51eb2 | 53 | |
kkoichy | 0:3a1f19e51eb2 | 54 | /****************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 55 | /* FUNCTION NAME: setAsservissementEtat */ |
kkoichy | 0:3a1f19e51eb2 | 56 | /* DESCRIPTION : Activer ou désactiver l'asservissement */ |
kkoichy | 0:3a1f19e51eb2 | 57 | /****************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 58 | void setAsservissementEtat(unsigned char enable); |
kkoichy | 0:3a1f19e51eb2 | 59 | |
kkoichy | 0:3a1f19e51eb2 | 60 | /****************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 61 | /* FUNCTION NAME: SendSpeed */ |
kkoichy | 0:3a1f19e51eb2 | 62 | /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ |
kkoichy | 0:3a1f19e51eb2 | 63 | /****************************************************************************************/ |
kkoichy | 0:3a1f19e51eb2 | 64 | void SendSpeed (unsigned short vitesse, unsigned short acceleration); |
Brand101 | 1:162aa6608ffe | 65 | |
Brand101 | 1:162aa6608ffe | 66 | |
kkoichy | 0:3a1f19e51eb2 | 67 | #endif |