Skip to content

Check requested message before trying callbacks #14

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

Merged

Conversation

BrechtSerckx
Copy link
Contributor

Hi,

I encountered this while working on #13.
Here is an example program to reproduce it: https://gist.github.com/BrechtSerckx/e682a30fb946292be58ab2be64ed49e3.
When no feedback handler is registered, calls to getFeedback fail. When a feedback handler is registered, calls still fail, but the callback is called.
getFeedback should not conflict with registered callbacks.

This patch first checks if a CAN message has been requested. Only if it wasn't, the callback handlers are checked.

@CLAassistant
Copy link

CLAassistant commented Apr 24, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@samuelsadok samuelsadok left a comment

Choose a reason for hiding this comment

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

Intent and implementation looks good to me.

Technically it could be a breaking change for someone but the previous behavior seems a bit quirky to rely on and we can bump the library version to 0.11.

Do you mind doing a rebase & force-push to trigger the new CI test? (see comment on #12)

@BrechtSerckx BrechtSerckx force-pushed the requested-cyclic-messages branch from 7c4f624 to c88f8a4 Compare April 24, 2025 11:15
@BrechtSerckx
Copy link
Contributor Author

Do you mind doing a rebase & force-push to trigger the new CI test? (see comment on #12)

I've rebased on master and force-pushed, but nothing seems to have been triggered. Could it be that the workflows need approval?

Copy link
Member

@samuelsadok samuelsadok left a comment

Choose a reason for hiding this comment

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

Thanks! Yes the workflows need approval to run.

@samuelsadok samuelsadok merged commit 848bdb1 into odriverobotics:master Apr 24, 2025
3 checks passed
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