Programme carte strategie (disco)

Dependencies:   mbed SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac

Revision:
28:acd18776ed2d
Parent:
14:c8fc06c4887f
Child:
29:41e02746041d
--- a/Asservissement/Asservissement.cpp	Fri May 26 19:01:56 2017 +0000
+++ b/Asservissement/Asservissement.cpp	Sat May 27 05:40:26 2017 +0000
@@ -193,4 +193,27 @@
 
     can1.write(msgTx);
         
-}
\ No newline at end of file
+}
+
+/****************************************************************************************/
+/* FUNCTION NAME: SendSpeedDecel                                                        */
+/* DESCRIPTION  : Envoie un asservissement paramètre retournant à une vitesse           */
+/****************************************************************************************/
+ 
+void SendSpeedDecel (unsigned short vitesse, unsigned short deceleration)
+{
+    CANMessage msgTx=CANMessage();
+    msgTx.id=ASSERVISSEMENT_CONFIG_DECEL;
+    msgTx.format=CANStandard;
+    msgTx.type=CANData;
+    msgTx.len=4;
+    msgTx.data[0]=(unsigned char)(vitesse&0x00FF);
+    msgTx.data[1]=(unsigned char)((vitesse&0xFF00)>>8);
+    msgTx.data[2]=(unsigned char)(deceleration&0x00FF);
+    msgTx.data[3]=(unsigned char)((deceleration&0xFF00)>>8);
+ 
+    can1.write(msgTx);
+        
+}
+   
+   
\ No newline at end of file