You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ko/guide/xml_schema.md
+10-5Lines changed: 10 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -84,9 +84,13 @@ For example, the definition of the [LANDING_TARGET_TYPE](../messages/common.md#L
84
84
</enum>
85
85
```
86
86
87
-
The main `enum`tags/fields are:
87
+
The main `enum`attributes are:
88
88
89
89
-`name`: The name of the enum (mandatory). This is a string of capitalized, underscore-separated words.
90
+
-`bitmask`: Set to `true` for enums that defines entries with values that increase by a power of 2, such as flags.
91
+
92
+
The main `enum` nested tags are:
93
+
90
94
-`description` (optional): A string describing the purpose of the enum
91
95
-`entry` (optional): An entry (zero or more entries can be specified for each enum)
92
96
-[deprecated](#deprecated) (optional): A tag indicating that the enum is deprecated.
@@ -97,10 +101,13 @@ The main `enum` tags/fields are:
97
101
98
102
### entry {#entry}
99
103
100
-
The "normal" enum `entry`tags/fields are:
104
+
The "normal" enum `entry`attributes are:
101
105
102
106
-`name`: The name of the enum value (mandatory). This is a string of capitalized, underscore-separated words.
103
107
-`value` (optional): The _value_ for the entry (a number).
108
+
109
+
The "normal" `entry` nested fields are:
110
+
104
111
-`description` (optional): A description of the entry.
105
112
-[deprecated](#deprecated) / [wip](#wip) (optional): A tag indicating that the enum is deprecated or "work in progress".
106
113
@@ -214,7 +221,7 @@ For example,the definition of the [BATTERY_STATUS](../messages/common.md#BATTERY
214
221
<fieldtype="uint8_t"name="charge_state"enum="MAV_BATTERY_CHARGE_STATE">State for extent of discharge, provided by autopilot for warning or external reactions</field>
215
222
<fieldtype="uint16_t[4]"name="voltages_ext"units="mV"invalid="[0]">Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead.</field>
216
223
<fieldtype="uint8_t"name="mode"enum="MAV_BATTERY_MODE">Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode.</field>
217
-
<fieldtype="uint32_t"name="fault_bitmask"display="bitmask"enum="MAV_BATTERY_FAULT">Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported).</field>
224
+
<fieldtype="uint32_t"name="fault_bitmask"enum="MAV_BATTERY_FAULT">Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported).</field>
218
225
</message>
219
226
```
220
227
@@ -261,8 +268,6 @@ The main message tags/fields are:
261
268
To get the original value, scale by multiplying the value with the multiplier (`360/256`).
262
269
This is currently only used for values where scaling is not encoded in the `units`.
263
270
264
-
-`display` (optional): This should be set as `display="bitmask"` for bitmask fields (hint to ground station that enum values must be displayed as checkboxes).
0 commit comments