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

Add topic on MAVLink C library #defines #492

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

hamishwillee
Copy link
Collaborator

Fixes mavlink/mavlink#44

@auturgy @julianoes This needs review - questions inline because most of what I did was guesses.

Note, there are other defines, but I think they are all internal.

en/mavgen_c/defines.md Outdated Show resolved Hide resolved
The following C `#defines` can be set in code in order to tune the setup for use on different platforms.

- `MAVLINK_USE_CONVENIENCE_FUNCTIONS` ([protocol.h](https://github.com/ArduPilot/pymavlink/blob/master/generator/C/include_v2.0/protocol.h)): Causes convenience functions to be defined, including: `_mav_finalize_message_chan_send()`, `_mavlink_send_uart()`, `_mavlink_resend_uart()`. To use, add `#define MAVLINK_USE_CONVENIENCE_FUNCTIONS` to your code.
- `MAVLINK_COMM_NUM_BUFFERS`: Sets the maximum number of comms buffers to be used (comms channels).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Would I be correct in thinking that you might specify 1 if you knew you had a mavlink component that would only have one connection to the network?

en/mavgen_c/defines.md Outdated Show resolved Hide resolved
en/mavgen_c/defines.md Outdated Show resolved Hide resolved
en/mavgen_c/defines.md Outdated Show resolved Hide resolved
en/mavgen_c/defines.md Outdated Show resolved Hide resolved
en/mavgen_c/defines.md Show resolved Hide resolved
en/mavgen_c/defines.md Outdated Show resolved Hide resolved
en/mavgen_c/defines.md Outdated Show resolved Hide resolved
@hamishwillee
Copy link
Collaborator Author

@julianoes OK, I've integrated your suggestions, and have one further question: #492 (comment)

If that's correct, is this otherwise OK to go in?
The criteria I'd use is that people will have some idea whether they might want to set each of the defines. They might not be certain, but they could either ask or dig for clarification.

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.

Document all constants for both user and developer use
2 participants