mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
Tools: autotest: logger_metadata: allow @LoggerEnum
to override enum name
This commit is contained in:
parent
19f197d47e
commit
10491702b5
@ -168,7 +168,7 @@ class EnumDocco(object):
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
# // @LoggerEnum: NAME - can be used around for #define sets
|
# // @LoggerEnum: NAME - can be used around for #define sets
|
||||||
m = re.match(r".*@LoggerEnum: *([\w]+)", line)
|
m = re.match(r".*@LoggerEnum: *([\w:]+)", line)
|
||||||
if m is not None:
|
if m is not None:
|
||||||
enum_name = m.group(1)
|
enum_name = m.group(1)
|
||||||
debug("%s: %s" % (source_file, enum_name))
|
debug("%s: %s" % (source_file, enum_name))
|
||||||
@ -180,6 +180,9 @@ class EnumDocco(object):
|
|||||||
|
|
||||||
continue
|
continue
|
||||||
if state == "inside":
|
if state == "inside":
|
||||||
|
if re.match(r"\s*enum.*$", line):
|
||||||
|
# Allow @LoggerEnum around Enum for name override
|
||||||
|
continue
|
||||||
if re.match(r"\s*$", line):
|
if re.match(r"\s*$", line):
|
||||||
continue
|
continue
|
||||||
if re.match(r"#if", line):
|
if re.match(r"#if", line):
|
||||||
|
Loading…
Reference in New Issue
Block a user