Skip to content

Commit ed146ad

Browse files
committed
Example updated.
1 parent ae797f2 commit ed146ad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/Sparkfun_CAN-BUS_Shield/Sparkfun_CAN-BUS_Shield.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bool transportRead(vscp_RxMessage * const rxMsg) {
5050
if (MCP2515::ERROR_OK == mcp2515.readMessage(&canMsg)) {
5151

5252
// Is it a extended CAN frame?
53-
if (true == canMsg.isExtendedAdrs) {
53+
if (0 != ((canMsg.can_id >> 31) & 0x01)) {
5454

5555
unsigned char index = 0;
5656

@@ -114,7 +114,7 @@ bool transportWrite(vscp_TxMessage const * const txMsg) {
114114
}
115115

116116
// Send CAN message
117-
if (MCP2515::ERROR_OK == mcp2515.sendMessage(canMsg, 10)) {
117+
if (MCP2515::ERROR_OK == mcp2515.sendMessage(canMsg)) {
118118

119119
// CAN message couldn't be sent, try again.
120120
++retryCnt;

0 commit comments

Comments
 (0)