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

Tools: remove redundant DroneCAN packet buffer initialization #27743

Merged
merged 2 commits into from
Aug 3, 2024

Conversation

tpwrules
Copy link
Contributor

@tpwrules tpwrules commented Aug 3, 2024

The <msg>_encode method always zeros the buffer up to <msg>_MAX_SIZE bytes so there is no need to do it before calling the function.

Saves at least 8 bytes per instance, e.g. 136 bytes on MatekL431-GPS. Tested in SITL and on a couple nodes.

The <msg>_encode method always zeros the buffer up to <msg>_MAX_SIZE
bytes so there is no need to do it before calling the function.

Saves at least 8 bytes per instance.
The <msg>_encode method always zeros the buffer up to <msg>_MAX_SIZE
bytes so there is no need to do it before calling the function.

Saves at least 8 bytes per instance.
@tridge
Copy link
Contributor

tridge commented Aug 3, 2024

thanks!

@tridge tridge merged commit f2f1ac3 into ArduPilot:master Aug 3, 2024
45 checks passed
@tpwrules tpwrules deleted the pr/remove-dronecan-buffer-clear branch August 3, 2024 19:22
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.

2 participants