openpilot v0.9.4 release

date: 2023-07-27T18:38:32
master commit: fa310d9e2542cf497d92f007baec8fd751ffa99c
This commit is contained in:
Vehicle Researcher
2023-07-27 18:38:33 +00:00
parent c39abc00af
commit 829e3c9672
293 changed files with 6449 additions and 3865 deletions
+12
View File
@@ -0,0 +1,12 @@
def crc8_pedal(data):
crc = 0xFF # standard init value
poly = 0xD5 # standard crc8: x8+x7+x6+x4+x2+1
size = len(data)
for i in range(size - 1, -1, -1):
crc ^= data[i]
for _ in range(8):
if ((crc & 0x80) != 0):
crc = ((crc << 1) ^ poly) & 0xFF
else:
crc <<= 1
return crc