v2019
Dependencies: CRAC-Strat_2019 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Dependents: Codeprincipal_2019 CRAC-Strat_2019
Asservissement/Asservissement.h@43:afddbbe873e3, 2019-02-13 (annotated)
- Committer:
- Artiom
- Date:
- Wed Feb 13 13:21:05 2019 +0000
- Revision:
- 43:afddbbe873e3
- Parent:
- 29:41e02746041d
pour theo.v
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
antbig | 0:ad97421fb1fb | 1 | #ifndef CRAC_ASSERVISSEMENT |
antbig | 0:ad97421fb1fb | 2 | #define CRAC_ASSERVISSEMENT |
antbig | 0:ad97421fb1fb | 3 | |
antbig | 0:ad97421fb1fb | 4 | |
Artiom | 43:afddbbe873e3 | 5 | void SendMsgCan(unsigned short id, unsigned char* data, int len); |
Artiom | 43:afddbbe873e3 | 6 | |
antbig | 0:ad97421fb1fb | 7 | /*********************************************************************************************************/ |
antbig | 0:ad97421fb1fb | 8 | /* FUNCTION NAME: SendRawId */ |
antbig | 0:ad97421fb1fb | 9 | /* DESCRIPTION : Envoie un message sans donnée, c'est-à-dire contenant uniquement un ID, sur le bus CAN */ |
antbig | 0:ad97421fb1fb | 10 | /*********************************************************************************************************/ |
antbig | 5:dcd817534b57 | 11 | void SendRawId (unsigned short id); |
antbig | 0:ad97421fb1fb | 12 | |
antbig | 5:dcd817534b57 | 13 | /*********************************************************************************************/ |
antbig | 5:dcd817534b57 | 14 | /* FUNCTION NAME: SendAck */ |
antbig | 5:dcd817534b57 | 15 | /* DESCRIPTION : Envoyer un acknowledge */ |
antbig | 5:dcd817534b57 | 16 | /*********************************************************************************************/ |
antbig | 5:dcd817534b57 | 17 | void SendAck(unsigned short id, unsigned short from); |
antbig | 0:ad97421fb1fb | 18 | |
antbig | 0:ad97421fb1fb | 19 | /*********************************************************************************************/ |
antbig | 0:ad97421fb1fb | 20 | /* FUNCTION NAME: GoToPosition */ |
antbig | 0:ad97421fb1fb | 21 | /* DESCRIPTION : Transmission CAN correspondant à un asservissement en position (x,y,theta) */ |
antbig | 0:ad97421fb1fb | 22 | /*********************************************************************************************/ |
antbig | 0:ad97421fb1fb | 23 | |
antbig | 0:ad97421fb1fb | 24 | void GoToPosition (unsigned short x,unsigned short y,signed short theta,signed char sens); |
antbig | 0:ad97421fb1fb | 25 | |
antbig | 0:ad97421fb1fb | 26 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 27 | /* FUNCTION NAME: Rotate */ |
antbig | 0:ad97421fb1fb | 28 | /* DESCRIPTION : Transmission CAN correspondant à une rotation */ |
antbig | 0:ad97421fb1fb | 29 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 30 | |
antbig | 0:ad97421fb1fb | 31 | void Rotate (signed short angle); |
antbig | 0:ad97421fb1fb | 32 | |
antbig | 1:116040d14164 | 33 | /*********************************************************************************************/ |
antbig | 1:116040d14164 | 34 | /* FUNCTION NAME: GoStraight */ |
antbig | 1:116040d14164 | 35 | /* DESCRIPTION : Transmission CAN correspondant à une ligne droite, avec ou sans recalage */ |
antbig | 1:116040d14164 | 36 | /* recalage : 0 => pas de recalage */ |
antbig | 1:116040d14164 | 37 | /* 1 => recalage en X */ |
antbig | 1:116040d14164 | 38 | /* 2 => Recalage en Y */ |
antbig | 1:116040d14164 | 39 | /* newValue : Uniquement en cas de recalage, indique la nouvelle valeur de l'odo */ |
antbig | 1:116040d14164 | 40 | /* isEnchainement : Indique si il faut executer l'instruction en enchainement */ |
antbig | 1:116040d14164 | 41 | /* 0 => non */ |
antbig | 1:116040d14164 | 42 | /* 1 => oui */ |
antbig | 6:eddfa414fd11 | 43 | /* 2 => dernière instruction de l'enchainement */ |
antbig | 1:116040d14164 | 44 | /*********************************************************************************************/ |
antbig | 1:116040d14164 | 45 | void GoStraight (signed short distance,unsigned char recalage, unsigned short newValue, unsigned char isEnchainement); |
antbig | 1:116040d14164 | 46 | |
antbig | 6:eddfa414fd11 | 47 | /********************************************************************************************/ |
antbig | 6:eddfa414fd11 | 48 | /* FUNCTION NAME: BendRadius */ |
antbig | 6:eddfa414fd11 | 49 | /* DESCRIPTION : Transmission CAN correspondant à un rayon de courbure */ |
antbig | 6:eddfa414fd11 | 50 | /********************************************************************************************/ |
antbig | 6:eddfa414fd11 | 51 | void BendRadius (unsigned short rayon,signed short angle,signed char sens, unsigned char enchainement); |
antbig | 6:eddfa414fd11 | 52 | |
antbig | 9:d0042422d95a | 53 | void SetOdometrie (unsigned short canId, unsigned short x,unsigned short y,signed short theta); |
antbig | 9:d0042422d95a | 54 | |
antbig | 12:14729d584500 | 55 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 56 | /* FUNCTION NAME: setAsservissementEtat */ |
antbig | 12:14729d584500 | 57 | /* DESCRIPTION : Activer ou désactiver l'asservissement */ |
antbig | 12:14729d584500 | 58 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 59 | void setAsservissementEtat(unsigned char enable); |
antbig | 12:14729d584500 | 60 | |
antbig | 12:14729d584500 | 61 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 62 | /* FUNCTION NAME: SendSpeed */ |
antbig | 12:14729d584500 | 63 | /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ |
antbig | 12:14729d584500 | 64 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 65 | void SendSpeed (unsigned short vitesse, unsigned short acceleration); |
antbig | 28:acd18776ed2d | 66 | /****************************************************************************************/ |
antbig | 28:acd18776ed2d | 67 | /* FUNCTION NAME: SendSpeedDecel */ |
antbig | 28:acd18776ed2d | 68 | /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ |
antbig | 28:acd18776ed2d | 69 | /****************************************************************************************/ |
antbig | 28:acd18776ed2d | 70 | void SendSpeedDecel (unsigned short vitesse, unsigned short deceleration); |
antbig | 28:acd18776ed2d | 71 | |
antbig | 0:ad97421fb1fb | 72 | #endif |