Skip to content

Conversation

@adeebshihadeh
Copy link
Contributor

@adeebshihadeh adeebshihadeh force-pushed the pypanda-spi-fixes branch 4 times, most recently from 6e9e952 to 6eca1ec Compare January 24, 2026 20:44
- SPI _wait_for_ack: default timeout=0 to 500ms, clamp to 100-500ms range
- SPI _transfer: default timeout=0 to 500ms, add MAX_TIMEOUT_RETRIES (5) limit
- SPI _transfer: add NACK backoff like C++ implementation
- SPI _transfer: run recovery logic for ALL exception types (fixes onroad test)
- CAN can_recv: max 3 retries instead of infinite loop, return [] on failure
- CAN can_send_many: detect no-progress and drop after 3 retries
- CAN_SEND_TIMEOUT_MS: changed from 10ms to 5ms to match C++

These changes align Python behavior with the C++ pandad implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@michaelmcsutton
Copy link

I am a GM owner with this issue plaguing my comma experience so I manually pushed the two files changed to my otherwise stock OpenPilot running on my Comma Four, and it seems to have fixed the issue, there was only one occurrence where my vehicle gave and LKAS fault: 25e31c3f3401cd77/0000006e--256667c195/52 but after a lunch break, the fault code was cleared and had no further issues on my long drive: 25e31c3f3401cd77/00000071--11aedcae87/0

I hope my logs can help in some way.

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