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

mavschema - 1E2 for scaled unitless values #894

Merged
merged 3 commits into from
May 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions generator/mavschema.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<xs:attribute name="enum" type="xs:string"/> <!-- used in field,param elements -->
<xs:attribute name="display" type="xs:string"/> <!-- used in field elements -->
<xs:attribute name="units" type="SI_Unit"/> <!-- this will get changed on the fly to xs:string if no strict-units command line option is used -->
<xs:attribute name="multiplier" type="factor"/>
<xs:attribute name="instance" type="xs:boolean"/>
<xs:attribute name="invalid" type="xs:string"/> <!-- used in message field elements -->
<xs:attribute name="value"> <!-- used in entry elements -->
Expand Down Expand Up @@ -174,6 +175,12 @@
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="factor">
<xs:restriction base="xs:string">
<xs:enumeration value="1E-2"/> <!-- actual value = stated value / 100 -->
</xs:restriction>
</xs:simpleType>

<!-- definition param elements attributes (like the ones used on MAV_CMD for example) -->
<xs:attribute name="index" type="xs:unsignedByte"/> <!-- parameter index -->
<xs:attribute name="label" type="xs:string"/> <!-- parameter label (name) -->
Expand All @@ -194,6 +201,7 @@
<xs:attribute ref="index" use="required"/>
<xs:attribute ref="label"/>
<xs:attribute ref="units"/>
<xs:attribute ref="multiplier"/>
<xs:attribute ref="instance"/>
<xs:attribute ref="enum" />
<xs:attribute ref="decimalPlaces"/>
Expand Down Expand Up @@ -238,6 +246,7 @@
<xs:attribute ref="increment"/>
<xs:attribute ref="minValue"/>
<xs:attribute ref="maxValue"/>
<xs:attribute ref="multiplier"/>
<xs:attribute ref="default" />
<xs:attribute ref="instance" />
<xs:attribute ref="invalid" />
Expand Down