Skip to content

Commit

Permalink
camera/component information: URI zero termination (#1807)
Browse files Browse the repository at this point in the history
* camera_information: make URI zero terminated

This way it's much easier to deal with this message as the last char can
just be set to '\0' before handing it. Otherwise it needs to be copied
first.

* component_information: make URI zero terminated

This way it's much easier to deal with this message as the last char can
just be set to '\0' before handing it. Otherwise it needs to be copied
first.
  • Loading branch information
julianoes committed Mar 2, 2022
1 parent b568a60 commit 5186324
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions message_definitions/v1.0/common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6403,7 +6403,7 @@
<field type="uint8_t" name="lens_id">Reserved for a lens ID</field>
<field type="uint32_t" name="flags" enum="CAMERA_CAP_FLAGS" display="bitmask">Bitmap of camera capability flags.</field>
<field type="uint16_t" name="cam_definition_version">Camera definition version (iteration)</field>
<field type="char[140]" name="cam_definition_uri">Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file).</field>
<field type="char[140]" name="cam_definition_uri">Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.</field>
</message>
<message id="260" name="CAMERA_SETTINGS">
<description>Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command.</description>
Expand Down Expand Up @@ -7069,9 +7069,9 @@
</description>
<field type="uint32_t" name="time_boot_ms" units="ms">Timestamp (time since system boot).</field>
<field type="uint32_t" name="general_metadata_file_crc">CRC32 of the general metadata file (general_metadata_uri).</field>
<field type="char[100]" name="general_metadata_uri">MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time.</field>
<field type="char[100]" name="general_metadata_uri">MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated.</field>
<field type="uint32_t" name="peripherals_metadata_file_crc">CRC32 of peripherals metadata file (peripherals_metadata_uri).</field>
<field type="char[100]" name="peripherals_metadata_uri">(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime.</field>
<field type="char[100]" name="peripherals_metadata_uri">(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about "attached components" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated.</field>
</message>
<message id="400" name="PLAY_TUNE_V2">
<description>Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE.</description>
Expand Down

0 comments on commit 5186324

Please sign in to comment.