#!/usr/bin/env python import re from param import * from emit import Emit import cgi # Emit docs in a form acceptable to the APM wordpress docs site class HtmlEmit(Emit): def __init__(self): html_fname = 'Parameters.html' self.f = open(html_fname, mode='w') self.preamble = '''
Reference Manual Table of Contents
This is a complete list of the parameters which can be set via the MAVLink protocol in the EEPROM of your APM to control vehicle behaviour. This list is automatically generated from the latest ardupilot source code, and so may contain parameters which are not yet in the stable released versions of the code.
[toc exclude="Complete Parameter List"] ''' self.t = '' def escape(self, s): s = s.replace(' ', '-') s = s.replace(':', '-') s = s.replace('(', '') s = s.replace(')', '') return s def close(self): self.f.write(self.preamble) self.f.write(self.t) self.f.close() def start_libraries(self): self.t += '\n\n%s
\n" % cgi.escape(param.Description) t += "Value | Meaning | \n" for value in values: v = value.split(':') t += "
---|---|
%s | %s |