Programme carte strategie (disco)
Dependencies: mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Asservissement/Asservissement.h@60:c7632af62d21, 2019-05-23 (annotated)
- Committer:
- kyxstark
- Date:
- Thu May 23 15:53:48 2019 +0000
- Revision:
- 60:c7632af62d21
- Parent:
- 50:a5361ffeefc8
Carte strat plus lib , mais programme
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 |
Artiom | 44:badcbe8766e9 | 3 | void Send2Short(unsigned short id, unsigned short d1, unsigned short d2); |
Artiom | 44:badcbe8766e9 | 4 | void SendMsgCan(unsigned short id, unsigned char* data, int len); |
antbig | 0:ad97421fb1fb | 5 | |
antbig | 0:ad97421fb1fb | 6 | /*********************************************************************************************************/ |
antbig | 0:ad97421fb1fb | 7 | /* FUNCTION NAME: SendRawId */ |
antbig | 0:ad97421fb1fb | 8 | /* DESCRIPTION : Envoie un message sans donnée, c'est-à-dire contenant uniquement un ID, sur le bus CAN */ |
antbig | 0:ad97421fb1fb | 9 | /*********************************************************************************************************/ |
antbig | 5:dcd817534b57 | 10 | void SendRawId (unsigned short id); |
antbig | 0:ad97421fb1fb | 11 | |
antbig | 5:dcd817534b57 | 12 | /*********************************************************************************************/ |
antbig | 5:dcd817534b57 | 13 | /* FUNCTION NAME: SendAck */ |
antbig | 5:dcd817534b57 | 14 | /* DESCRIPTION : Envoyer un acknowledge */ |
antbig | 5:dcd817534b57 | 15 | /*********************************************************************************************/ |
antbig | 5:dcd817534b57 | 16 | void SendAck(unsigned short id, unsigned short from); |
antbig | 0:ad97421fb1fb | 17 | |
antbig | 0:ad97421fb1fb | 18 | /*********************************************************************************************/ |
antbig | 0:ad97421fb1fb | 19 | /* FUNCTION NAME: GoToPosition */ |
antbig | 0:ad97421fb1fb | 20 | /* DESCRIPTION : Transmission CAN correspondant à un asservissement en position (x,y,theta) */ |
antbig | 0:ad97421fb1fb | 21 | /*********************************************************************************************/ |
antbig | 0:ad97421fb1fb | 22 | |
antbig | 0:ad97421fb1fb | 23 | void GoToPosition (unsigned short x,unsigned short y,signed short theta,signed char sens); |
antbig | 0:ad97421fb1fb | 24 | |
antbig | 0:ad97421fb1fb | 25 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 26 | /* FUNCTION NAME: Rotate */ |
antbig | 0:ad97421fb1fb | 27 | /* DESCRIPTION : Transmission CAN correspondant à une rotation */ |
antbig | 0:ad97421fb1fb | 28 | /****************************************************************************************/ |
antbig | 0:ad97421fb1fb | 29 | |
antbig | 0:ad97421fb1fb | 30 | void Rotate (signed short angle); |
antbig | 0:ad97421fb1fb | 31 | |
antbig | 1:116040d14164 | 32 | /*********************************************************************************************/ |
antbig | 1:116040d14164 | 33 | /* FUNCTION NAME: GoStraight */ |
antbig | 1:116040d14164 | 34 | /* DESCRIPTION : Transmission CAN correspondant à une ligne droite, avec ou sans recalage */ |
antbig | 1:116040d14164 | 35 | /* recalage : 0 => pas de recalage */ |
antbig | 1:116040d14164 | 36 | /* 1 => recalage en X */ |
antbig | 1:116040d14164 | 37 | /* 2 => Recalage en Y */ |
antbig | 1:116040d14164 | 38 | /* newValue : Uniquement en cas de recalage, indique la nouvelle valeur de l'odo */ |
antbig | 1:116040d14164 | 39 | /* isEnchainement : Indique si il faut executer l'instruction en enchainement */ |
antbig | 1:116040d14164 | 40 | /* 0 => non */ |
antbig | 1:116040d14164 | 41 | /* 1 => oui */ |
antbig | 6:eddfa414fd11 | 42 | /* 2 => dernière instruction de l'enchainement */ |
antbig | 1:116040d14164 | 43 | /*********************************************************************************************/ |
antbig | 1:116040d14164 | 44 | void GoStraight (signed short distance,unsigned char recalage, unsigned short newValue, unsigned char isEnchainement); |
antbig | 1:116040d14164 | 45 | |
antbig | 6:eddfa414fd11 | 46 | /********************************************************************************************/ |
antbig | 6:eddfa414fd11 | 47 | /* FUNCTION NAME: BendRadius */ |
antbig | 6:eddfa414fd11 | 48 | /* DESCRIPTION : Transmission CAN correspondant à un rayon de courbure */ |
antbig | 6:eddfa414fd11 | 49 | /********************************************************************************************/ |
antbig | 6:eddfa414fd11 | 50 | void BendRadius (unsigned short rayon,signed short angle,signed char sens, unsigned char enchainement); |
antbig | 6:eddfa414fd11 | 51 | |
antbig | 9:d0042422d95a | 52 | void SetOdometrie (unsigned short canId, unsigned short x,unsigned short y,signed short theta); |
antbig | 9:d0042422d95a | 53 | |
antbig | 12:14729d584500 | 54 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 55 | /* FUNCTION NAME: setAsservissementEtat */ |
antbig | 12:14729d584500 | 56 | /* DESCRIPTION : Activer ou désactiver l'asservissement */ |
antbig | 12:14729d584500 | 57 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 58 | void setAsservissementEtat(unsigned char enable); |
antbig | 12:14729d584500 | 59 | |
antbig | 12:14729d584500 | 60 | /****************************************************************************************/ |
antbig | 12:14729d584500 | 61 | /* FUNCTION NAME: SendSpeed */ |
antbig | 12:14729d584500 | 62 | /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ |
antbig | 12:14729d584500 | 63 | /****************************************************************************************/ |
Artiom | 50:a5361ffeefc8 | 64 | void SendSpeed (unsigned short vitesse, unsigned short acceleration,unsigned short deceleration); |
antbig | 28:acd18776ed2d | 65 | /****************************************************************************************/ |
antbig | 28:acd18776ed2d | 66 | /* FUNCTION NAME: SendSpeedDecel */ |
antbig | 28:acd18776ed2d | 67 | /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ |
antbig | 28:acd18776ed2d | 68 | /****************************************************************************************/ |
antbig | 28:acd18776ed2d | 69 | void SendSpeedDecel (unsigned short vitesse, unsigned short deceleration); |
antbig | 28:acd18776ed2d | 70 | |
antbig | 0:ad97421fb1fb | 71 | #endif |