-
Notifications
You must be signed in to change notification settings - Fork 99
Bump MAVLink version #454
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
Open
tbolin
wants to merge
6
commits into
mavlink:master
Choose a base branch
from
tbolin:bump_mavlink
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Bump MAVLink version #454
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
473d2ef
Update mavlink definitions
4f14e06
add support for superseded tag in bindgen
4b5afb4
Add feature gates and documentation for marsh and stemstudios dialects
9f739ca
Apply Clippy suggestions for MavDeprecationType
be8b18c
fix mav bool not compiling with 'standard' dialect
ef10a99
fix typo in list of dialects
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| <mavlink> | ||
| <enums> | ||
| <enum name="MAV_ROI"> | ||
| <superseded since="2018-01" replaced_by="`MAV_CMD_DO_SET_ROI_*`"/> | ||
| <description>The ROI (region of interest) for the vehicle. This can be | ||
| be used by the vehicle for camera/vehicle attitude alignment (see | ||
| MAV_CMD_NAV_ROI).</description> | ||
| <entry value="0" name="MAV_ROI_NONE"> | ||
| <description>No region of interest.</description> | ||
| </entry> | ||
| <entry value="1" name="MAV_ROI_WPNEXT"> | ||
| <description>Point toward next waypoint, with optional pitch/roll/yaw offset.</description> | ||
| </entry> | ||
| <entry value="2" name="MAV_ROI_WPINDEX"> | ||
| <description>Point toward given waypoint.</description> | ||
| </entry> | ||
| <entry value="3" name="MAV_ROI_LOCATION"> | ||
| <description>Point toward fixed location.</description> | ||
| </entry> | ||
| <entry value="4" name="MAV_ROI_TARGET"> | ||
| <description>Point toward of given id.</description> | ||
| </entry> | ||
| </enum> | ||
| <enum name="MAV_FRAME"> | ||
| <description>Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles. | ||
| </description> | ||
| <!-- ... --> | ||
| <entry value="5" name="MAV_FRAME_GLOBAL_INT"> | ||
| <superseded since="2024-03" replaced_by="MAV_FRAME_GLOBAL">Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement.</superseded> | ||
| <description>Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL).</description> | ||
| </entry> | ||
| <!-- ... --> | ||
| </enum> | ||
| </enums> | ||
| <messages> | ||
| <message id="370" name="SMART_BATTERY_INFO"> | ||
| <superseded since="2024-02" replaced_by="BATTERY_INFO">The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not "smart".</superseded> | ||
| <description>Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates.</description> | ||
| <field type="uint8_t" name="id" instance="true">Battery ID</field> | ||
| <field type="uint8_t" name="battery_function" enum="MAV_BATTERY_FUNCTION">Function of the battery</field> | ||
| <field type="uint8_t" name="type" enum="MAV_BATTERY_TYPE">Type (chemistry) of the battery</field> | ||
| <field type="int32_t" name="capacity_full_specification" units="mAh" invalid="-1">Capacity when full according to manufacturer, -1: field not provided.</field> | ||
| <field type="int32_t" name="capacity_full" units="mAh" invalid="-1">Capacity when full (accounting for battery degradation), -1: field not provided.</field> | ||
| <field type="uint16_t" name="cycle_count" invalid="UINT16_MAX">Charge/discharge cycle count. UINT16_MAX: field not provided.</field> | ||
| <field type="char[16]" name="serial_number" invalid="[0]">Serial number in ASCII characters, 0 terminated. All 0: field not provided.</field> | ||
| <field type="char[50]" name="device_name" invalid="[0]">Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore.</field> | ||
| <field type="uint16_t" name="weight" units="g" invalid="0">Battery weight. 0: field not provided.</field> | ||
| <field type="uint16_t" name="discharge_minimum_voltage" units="mV" invalid="UINT16_MAX">Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value.</field> | ||
| <field type="uint16_t" name="charging_minimum_voltage" units="mV" invalid="UINT16_MAX">Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value.</field> | ||
| <field type="uint16_t" name="resting_minimum_voltage" units="mV" invalid="UINT16_MAX">Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value.</field> | ||
| <extensions/> | ||
| <field type="uint16_t" name="charging_maximum_voltage" units="mV" invalid="0">Maximum per-cell voltage when charged. 0: field not provided.</field> | ||
| <field type="uint8_t" name="cells_in_series" invalid="0">Number of battery cells in series. 0: field not provided.</field> | ||
| <field type="uint32_t" name="discharge_maximum_current" units="mA" invalid="0">Maximum pack discharge current. 0: field not provided.</field> | ||
| <field type="uint32_t" name="discharge_maximum_burst_current" units="mA" invalid="0">Maximum pack discharge burst current. 0: field not provided.</field> | ||
| <field type="char[11]" name="manufacture_date" invalid="[0]">Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided.</field> | ||
| </message> | ||
| </messages> | ||
| </mavlink> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| source: mavlink-bindgen/tests/e2e_snapshots.rs | ||
| assertion_line: 26 | ||
| expression: contents | ||
| --- | ||
| #[allow(non_camel_case_types)] | ||
| #[allow(clippy::derive_partial_eq_without_eq)] | ||
| #[allow(clippy::field_reassign_with_default)] | ||
| #[allow(non_snake_case)] | ||
| #[allow(clippy::unnecessary_cast)] | ||
| #[allow(clippy::bad_bit_mask)] | ||
| #[allow(clippy::suspicious_else_formatting)] | ||
| #[cfg(feature = "superseded")] | ||
| pub mod superseded; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not right as
selfimplements bitflags.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need some input on how to solve this.
The problem is that
selfdoes not implement bitflags if the dialect defines MAV_BOOL but does not use it in any messages (e.g. the standard dialect).I think the best solution would be to default to either u8 or i8 if the type of MAV_BOOL can't be deduced from how it is used in the dialect. Then MAV_BOOL would always implement bitflags and
self.contains(Self::MAV_BOOL_TRUE)would always be valid.The only way I could see that this could cause problems is if a dialect that currently defines but not use MAV_BOOL starts using MAV_BOOL in a way that does not agree with the default.
However, I'm not sure if the current solution (not implementing bitflags at all) would be any better in that case.
I'm also open to other suggestions.