Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Ardupilot
GitHub Repository: Ardupilot/ardupilot
Path: blob/master/Tools/autotest/param_metadata/emit.py
9673 views
1
"""
2
The standard interface emitters must implement
3
"""
4
5
import re
6
7
8
class Emit:
9
def __init__(self):
10
pass
11
12
prog_values_field = re.compile(r"-?\d*\.?\d+: ?[\w ]+,?")
13
emit_legacy_params = True
14
15
def close(self):
16
pass
17
18
def start_libraries(self):
19
pass
20
21
def emit(self, g):
22
pass
23
24
def should_emit_param(self, param):
25
if not self.emit_legacy_params and getattr(param, 'Legacy', False):
26
return False
27
return True
28
29
def should_emit_field(self, param, field):
30
return field not in ['Legacy']
31
32