Skip to content

Conversation

@bakerstu
Copy link
Owner

@bakerstu bakerstu commented Sep 7, 2025

I found an issue when doing firmware updates on the main decoder MCU. Basically, execution stalls whenever FLASH is erased/programmed. This causes the main decoder MCU to miss an occasional ping, and since we only reset the link timeout on a pong response, this results in a link down, eventually.

This could also be an issue for other memory space writes, such as CVs.

  • Adds a callback registration to the RxInterface that is called whenever any packet is received.
  • Adds callback to the the LinkManager to reset the link timeout.
    • This logic is moved from the PING_RESP handler.
  • Fixes unit tests.

@bakerstu bakerstu requested a review from balazsracz September 7, 2025 02:40
}

/// Register for a callback when any packet is received.
virtual void register_packet_rx_callback(std::function<void()> callback)
Copy link
Collaborator

Choose a reason for hiding this comment

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

this probably should not be virtual, since the only meaningful implementation is inline here.

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