v2019
Dependencies: CRAC-Strat_2019 SerialHalfDuplex SDFileSystem DISCO-F469NI_portrait liaison_Bluetooth ident_crac
Dependents: Codeprincipal_2019 CRAC-Strat_2019
Diff: Asservissement/Asservissement.cpp
- Revision:
- 50:a5361ffeefc8
- Parent:
- 44:badcbe8766e9
diff -r d83a4851a257 -r a5361ffeefc8 Asservissement/Asservissement.cpp --- a/Asservissement/Asservissement.cpp Thu May 16 12:08:07 2019 +0000 +++ b/Asservissement/Asservissement.cpp Fri May 17 21:06:46 2019 +0000 @@ -215,17 +215,24 @@ /* FUNCTION NAME: SendSpeed */ /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ /****************************************************************************************/ -void SendSpeed (unsigned short vitesse, unsigned short acceleration) +void SendSpeed (unsigned short vitesse, unsigned short acceleration,unsigned short deceleration) { CANMessage msgTx=CANMessage(); msgTx.id=ASSERVISSEMENT_CONFIG; msgTx.format=CANStandard; msgTx.type=CANData; - msgTx.len=4; + msgTx.len=8; msgTx.data[0]=(unsigned char)(vitesse&0x00FF); msgTx.data[1]=(unsigned char)((vitesse&0xFF00)>>8); + msgTx.data[2]=(unsigned char)(acceleration&0x00FF); msgTx.data[3]=(unsigned char)((acceleration&0xFF00)>>8); + + msgTx.data[4]=(unsigned char)(deceleration&0x00FF); + msgTx.data[5]=(unsigned char)((deceleration&0xFF00)>>8); + + msgTx.data[6]=(unsigned char)(acceleration&0x00FF);//cloto + msgTx.data[7]=(unsigned char)((acceleration&0xFF00)>>8);//cloto can2.write(msgTx); @@ -235,7 +242,7 @@ /* FUNCTION NAME: SendSpeedDecel */ /* DESCRIPTION : Envoie un asservissement paramètre retournant à une vitesse */ /****************************************************************************************/ - + /* void SendSpeedDecel (unsigned short vitesse, unsigned short deceleration) { CANMessage msgTx=CANMessage(); @@ -250,6 +257,6 @@ can2.write(msgTx); -} +}*/ \ No newline at end of file