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

CRC Validation of MetadataTypes Does Not Obey Schema #11897

Open
RbtsEvrwhr-Riley opened this issue Sep 18, 2024 · 4 comments
Open

CRC Validation of MetadataTypes Does Not Obey Schema #11897

RbtsEvrwhr-Riley opened this issue Sep 18, 2024 · 4 comments
Assignees

Comments

@RbtsEvrwhr-Riley
Copy link

We have encountered an issue where the fileCrc field in the metadata_general schema is required in QGC but not required by the MavLink protocol reference. We have isolated the exact point of failure, and have worked around it locally for now. What do we want to do about this issue?

Expected Behavior

A metadata_general.json file that follows the schema correctly should be parsed and loaded.

Current Behavior

A metadata_general.json file that does not contain the optional field of fileCrc for every file in metadataTypes will not be parsed. Crcvalid is checked in CompInfoGeneral.cc CompInfoGeneral::setJson line 73

Steps to Reproduce:

Please provide an unambiguous set of steps to reproduce the current behavior

  1. Configure any UAS with a general metadata file like the attached development file.
  2. Connect to a new instance of qGroundControl such that it the file downloads using ftp or loads from cache
  3. The parameter and actuator files will not be loaded.

System Information

When posting bug reports, include the following information

  • QGC all versions since 9/12/2022 Daily
  • Windows and Linux
  • Any flight controller that supports COMPONENT_METADATA

Detailed Description

https://github.com/mavlink/mavlink/blob/master/component_metadata/general.schema.json here is the reference schema.

Log Files and Screenshots

  • We have moved past this issue in development, if you need logs regenerated we can do that but repro steps and the root cause have already been isolated.

metadata_general.json

@DonLakeFlyer
Copy link
Contributor

@bkueng Can you look at this?

@bkueng
Copy link
Member

bkueng commented Sep 20, 2024

You are correct, QGC should not reject it if the CRC is missing. Do you want to create a PR?

Please also be aware the a missing CRC is generally intended for dynamically changing metadata, which is not implemented in MAVLink. A missing CRC at this point means QGC will have to download the file each time it connects to the vehicle.

@DonLakeFlyer
Copy link
Contributor

Please also be aware the a missing CRC is generally intended for dynamically changing metadata, which is not implemented in MAVLink. A missing CRC at this point means QGC will have to download the file each time it connects to the vehicle.

"description": "CRC32 checksum of the file. This should not be set for dynamically updated metadata."

The json schema description is not a clear as this statement. Should that be updated with better wording like "dynamically changing" and no GCS caching?

@bkueng
Copy link
Member

bkueng commented Sep 27, 2024

Yes I can do that

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants