Commit Graph

15 Commits

Author SHA1 Message Date
Pierre Kancir 5bdc77a5b9 Tools: param_metadata: remove useless shebang 2022-06-08 08:16:42 +09:00
Peter Barker c18c4ad6ec Tools: param_metadata: remove use of dirname when creating Vehicle
So a Vehicle object takes a truename - i.e. Copter, not ArduCopter, but
can also take a "reference", which is used for e.g. constructing RST
tags.
2021-05-13 21:09:45 +10:00
Peter Barker b369e86c0c Tools: param_parse: remove references to APM in parameter generation 2021-04-07 17:08:25 +10:00
Peter Barker 229b25d916 Tools: param_parse: add *args and **kwargs to emitters 2021-04-07 17:08:25 +10:00
Peter Barker 18ded114ae Tools: param_metadata; stop prettifying XML before emitting
indent is not available on our documentation server:

[build_parameters.py]
Traceback (most recent call last):
  File "./param_parse.py", line 422, in <module>
    do_emit(XmlEmit())
  File "./param_parse.py", line 415, in do_emit
    emit.close()
  File "/home/wiki/build_wiki/ardupilot/Tools/autotest/param_metadata/xmlemit.py
", line 24, in close
    etree.indent(self.paramfile)
AttributeError: module 'lxml.etree' has no attribute 'indent'
2021-04-02 14:39:39 +11:00
Pierre Kancir 69fab70582 Tools: use lxml for xml generation
fix caracters
fix indentation
validate xml
2020-12-30 18:19:43 +11:00
Pierre Kancir 774c8583b1 Tools: make apm.pdef.xml more readable. 2020-10-07 19:38:14 +11:00
Peter Barker 16f4d33d00 Tools: add known Calibration tag to apm.pdef.xml
this will allow a GCS to hide anything that a user should never
ordinarily have to see in terms of calibration parameters
2020-02-04 20:29:09 +11:00
Michael du Breuil bb7abc2935 Tools: Allow specifying parameter metadata format
Also removes unneeded passing of a file pointer
2018-12-11 10:24:40 +11:00
Peter Barker dca866c98d Tools: make parameter generation failure clearer 2018-03-26 12:39:23 +11:00
Dr.-Ing. Amilcar Do Carmo Lucas d7c7deacdf Tools: Follow SI units conventions
http://physics.nist.gov/cuu/Units/units.html
http://physics.nist.gov/cuu/Units/outside.html
and
http://physics.nist.gov/cuu/Units/checklist.html
http://www.bipm.org/en/publications/si-brochure/
http://www1.bipm.org/en/CGPM/db/3/2/   g_n unit for G-force
one further constrain is that only printable (7bit) ASCII characters are allowed

Add a validation so that Travis can validate the units
Use full text unit information when generating .wiki, .rst and .html documentation
Use both unit symbol and unit full text when generating .xml
2017-05-17 18:07:25 +10:00
Pierre Kancir 9e1ffcae5d Tools: update python coding style
Tools: update PrintVersion.py coding style

autotest: update python coding style

pysim: update python coding style

jsb_sim: update Python coding style

param_metadata: update Python coding style
2016-09-01 13:05:11 +10:00
Kevin Hester d3dad7afee autotest: add @User autodocs to the apm.pdef.xml as user=foo 2013-04-16 11:19:15 +10:00
Kevin Hester a86ede4270 autotest: APM xml docs should be named xml.pdef.xml
(not arduplane.pdef.xml)

pch: rebased pull request #188
2013-04-07 11:12:11 -07:00
Kevin Hester 9885cc7ed1 Docs: Add XML emit to param_parse.py. See below for more details...
I've refactored the param_parse tool to use various 'emitters'.  An emitter
can take parameter info and output it in a particular format.  Currently the
only supported emitters are the wiki and XML formats.

The goal of these changes is to create a standard machine readable description
of parameters - mainly for use by ground control stations, but it will also
enable spiffy scripting environments where code can refer symbolically to
vehicle parameters (reflectionish).

Open issue: Is there any sort of Ardupilot build id which can be included in
the generated XML?  That would ensure that we select the correct paramdefs
for the load on the target (possibly by asking the target for a SHA or
somesuch).  If that issue is resolved, then the filename for the XML
file should probably be something like:
arduplane-ca5742ac.pdef.xml.

It is worth noting that I've proposed a suffix of ".pdef.xml" for these file
types.  This facilitates automated file handling on Android devices.  On
Android you can register 'handlers' for particular file extensions and if
the user tries to open that extension in email or a web browser your app
will be given a chance to do something about it.  The 'outer' xml extension
will allow naive editors to know that at least this is an xml file.

I will include a sample of the XML format with the pull-request for this CL.
2013-03-10 17:47:42 +11:00