Skip to content

Commit

Permalink
bros ok match bros
Browse files Browse the repository at this point in the history
  • Loading branch information
geohot committed Jun 10, 2018
1 parent 55da0b6 commit be22522
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
8 changes: 6 additions & 2 deletions board/drivers/can.h
Original file line number Diff line number Diff line change
Expand Up @@ -488,9 +488,13 @@ void bitbang_gmlan(CAN_FIFOMailBox_TypeDef *to_bang) {
0,0,1, // 1st byte 2-0

// start CRC
0,1,0,0,0,0,1,1,0,0,0,0,0,
/*0,1,0,0,0,0,1,1,0,0,0,0,0,
1, // bitstuff
0,0, // CRC field
0,0, // CRC field*/

// CRC from real message
1,1,1,0,1,1,1,0,1,0,1,0,0,1,1,1,

1, // CRC delimiter

1, // ACK
Expand Down
11 changes: 10 additions & 1 deletion tests/gmbitbang/rigol.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@
rawdata = scope.read_raw()
data = np.frombuffer(rawdata, 'B')
print data.shape
plt.plot(data)

s1 = data[0:600]
s2 = data[600:]
s1i = np.argmax(s1 > 100)
s2i = np.argmax(s2 > 100)
s1 = s1[s1i:]
s2 = s2[s2i:]

plt.plot(s1)
plt.plot(s2)
plt.show()
#data = (data - 130.0 - voltoffset/voltscale*25) / 25 * voltscale

Expand Down

0 comments on commit be22522

Please sign in to comment.