Skip to content

Commit

Permalink
Update SimpleJ1939.cpp
Browse files Browse the repository at this point in the history
CAN ID fix
  • Loading branch information
vChavezB authored May 10, 2022
1 parent dcffb6f commit 30d3bd2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SimpleJ1939.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ bool SimpleJ1939::PeerToPeer(long lPGN)
byte SimpleJ1939::Transmit(long lPGN, byte nPriority, byte nSrcAddr, byte nDestAddr, byte* nData, int nDataLen)
{
// Declarations
long lID = static_cast<long>(nPriority)<< 26 + (lPGN << 8) + static_cast<long>(nSrcAddr);
long lID = static_cast<long>(nPriority)<< 26 | static_cast<long>(lPGN << 8) | static_cast<long>(nSrcAddr);

// If PGN represents a peer-to-peer, add destination address to the ID
if (PeerToPeer(lPGN) == true)
Expand Down

0 comments on commit 30d3bd2

Please sign in to comment.