code de la carte IHM avant les bugs et avant le travail effectué avec Melchior

Dependencies:   mbed SerialHalfDuplex SDFileSystem liaison_Bluetooth ident_crac DISCO-F469NI_portrait

Committer:
gabrieltetar
Date:
Thu Jan 30 16:45:47 2020 +0000
Revision:
0:41cc45429aba
Child:
21:d137ec53c3a9
sqdsq

Who changed what in which revision?

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