-
Notifications
You must be signed in to change notification settings - Fork 9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
b2dbb50 remove toyota ipas safety code and tests (#460) a379faf White Panda's Wi-Fi setup instructions (#457) 11ef24b Improve tests (#456) fb02390 Subaru checksum counter (#455) 9a44499 Fix Subaru Legacy Torque driver bug (#454) dfa6b07 separating subary legacy safety mode from global (#452) dad5858 Chrysler: add brakepress cancellation (#451) db94a5b Added Nissan safety (#244) d7f1195 Chrysler Checksum/counter (#450) 96e535e abstract crc function (#448) 1b49d3e Hyundai: add gas disengage and tests (#447) 598074c Volkswagen safety updates: Phase 2 (#445) b2ffaae Chrysler: disengage on gas press (#442) 2ebbe36 Subaru: disengage on gas press (#446) ccf75c4 Volkswagen safety updates: Phase 1 (#444) git-subtree-dir: panda git-subtree-split: b2dbb50
- Loading branch information
Vehicle Researcher
committed
Mar 5, 2020
1 parent
6b8726e
commit 1dc1487
Showing
28 changed files
with
1,675 additions
and
981 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
uint8_t crc_checksum(uint8_t *dat, int len, const uint8_t poly) { | ||
uint8_t crc = 0xFF; | ||
int i, j; | ||
for (i = len - 1; i >= 0; i--) { | ||
crc ^= dat[i]; | ||
for (j = 0; j < 8; j++) { | ||
if ((crc & 0x80U) != 0U) { | ||
crc = (uint8_t)((crc << 1) ^ poly); | ||
} | ||
else { | ||
crc <<= 1; | ||
} | ||
} | ||
} | ||
return crc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.