[flight_plan] add binding to ABI messages from flight plan (#2106)

This feature allows to create an automatic binding to a ABI message
while specifying the list of variable names ('_' are ignored).
A local (static) variable is updated to the latest value each time a new
message is received and it can be read in any flight plan instruction.

Example of usage:

 <variables>
  <abi_binding name="VELOCITY_ESTIMATE" vars="_, vx, vy, vz, _"/>
 </variables>

please not the in this example, the first and the last variable are
ignored but the number of variable must match the number of fields in
ABI messages description (conf/abi.xml).

An extra attribute 'id' allows to set a specific sender ID (by default
ABI_BROADCAST).
This commit is contained in:
Gautier Hattenberger
2017-08-23 13:18:37 +02:00
committed by GitHub
parent d1b7d790e4
commit da5c424ada
4 changed files with 95 additions and 7 deletions
+7 -1
View File
@@ -14,8 +14,9 @@
<!ELEMENT corner EMPTY>
<!ELEMENT kml EMPTY>
<!ELEMENT variables (variable*)>
<!ELEMENT variables (variable|abi_binding)*>
<!ELEMENT variable EMPTY>
<!ELEMENT abi_binding EMPTY>
<!ELEMENT modules (module*)>
<!ELEMENT module (configure|define)*>
@@ -114,6 +115,11 @@ alt_unit CDATA #IMPLIED
alt_unit_coef CDATA #IMPLIED
values CDATA #IMPLIED>
<!ATTLIST abi_binding
name CDATA #REQUIRED
vars CDATA #REQUIRED
id CDATA #IMPLIED>
<!ATTLIST modules>
<!ATTLIST module