carte esclave Petit Robot
Dependencies: mbed Herkulex_Library_2019 actions_Gr ident_crac actions_Pr
Diff: Asservissement/Asservissement.cpp
- Revision:
- 39:124575240d09
- Parent:
- 25:9627700d989f
diff -r 9295a9721acb -r 124575240d09 Asservissement/Asservissement.cpp --- a/Asservissement/Asservissement.cpp Thu May 23 17:23:10 2019 +0000 +++ b/Asservissement/Asservissement.cpp Thu May 23 18:42:51 2019 +0000 @@ -64,6 +64,17 @@ can.write(msgTx); } +void SendCharCan(unsigned short id, unsigned char data) +{ + CANMessage msgTx=CANMessage(); + msgTx.id=id; + msgTx.len=1; + msgTx.format=CANStandard; + msgTx.type=CANData; + msgTx.data[0]=data; + + can.write(msgTx); +}