Skip to content

Commit

Permalink
fixed extended ID receiving
Browse files Browse the repository at this point in the history
  • Loading branch information
ericevenchick committed Apr 3, 2019
1 parent aea71f3 commit e9fc2da
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/socketcan/interface_raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ func (i Interface) RecvFrame() (CanFrame, error) {

// bytes 0-3: arbitration ID
f.ArbId = uint32(binary.LittleEndian.Uint32(frameBytes[0:4]))
// remove bit 31: extended ID flag
f.ArbId = f.ArbId & 0x7FFFFFFF
// byte 4: data length code
f.Dlc = frameBytes[4]
// data
Expand Down

0 comments on commit e9fc2da

Please sign in to comment.