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

Update Examples to no longer use legacy API #55

Open
tsebaschtian opened this issue Sep 14, 2023 · 0 comments
Open

Update Examples to no longer use legacy API #55

tsebaschtian opened this issue Sep 14, 2023 · 0 comments

Comments

@tsebaschtian
Copy link

tsebaschtian commented Sep 14, 2023

I found it quite odd that among others the Servo example still uses the canardRequestOrRespond() function that is described in the canard.h file as following:

// Legacy API, try to avoid using it, as this will not be extended with new features
int16_t canardRequestOrRespond(CanardInstance* ins,             ///< Library instance
                               uint8_t destination_node_id,     ///< Node ID of the server/client
                               uint64_t data_type_signature,    ///< See above
                               uint8_t data_type_id,            ///< Refer to the specification
                               uint8_t* inout_transfer_id,      ///< Pointer to a persistent variable with transfer ID
                               uint8_t priority,                ///< Refer to definitions CANARD_TRANSFER_PRIORITY_*
                               CanardRequestResponse kind,      ///< Refer to CanardRequestResponse
                               const void* payload,             ///< Transfer payload
                               uint16_t payload_len             ///< Length of the above, in bytes

If this is legacy API, i would suggest that the examples get updated to use the new and recommended API.
I would do it myself, but i'm not deep enough into how the library is properly used.
Thanks in advance.

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

No branches or pull requests

1 participant