Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyundai CAN-FD: Move CRC compute function to common Hyundai safety #1634

Merged

Conversation

sunnyhaibin
Copy link
Contributor

Move CAN-FD CRC compute function to shared Hyundai safety. The 2023 Palisade/Telluride ports compute checksum for SCC12 | 0x421 in Hyundai CAN safety.

Prerequisite of

@sunnyhaibin sunnyhaibin changed the title HKG CAN-FD: Move CRC compute function to common Hyundai safety Hyundai CAN-FD: Move CRC compute function to common Hyundai safety Sep 1, 2023
@sunnyhaibin sunnyhaibin force-pushed the hkg-canfd-compute-chksum-common branch from 248cd90 to 09ba2d9 Compare September 5, 2023 04:45
…mpute-chksum-common

# Conflicts:
#	board/safety/safety_subaru.h
@@ -232,7 +232,7 @@ static int subaru_tx_hook(CANPacket_t *to_send) {
if (addr == MSG_SUBARU_ES_Distance) {
int cruise_throttle = (GET_BYTES(to_send, 2, 2) & 0xFFFU);
bool cruise_cancel = GET_BIT(to_send, 56U) != 0U;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this change to the subaru safety

}

return crc;
return hyundai_common_canfd_compute_checksum(to_push);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to wrap this in the CAN FD safety

@adeebshihadeh adeebshihadeh merged commit 7af3362 into commaai:master Oct 3, 2023
@sunnyhaibin sunnyhaibin deleted the hkg-canfd-compute-chksum-common branch October 3, 2023 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants