mirror of https://github.com/ArduPilot/ardupilot
Tools: extract_features.py: sort extracted features string into more useful order
when taking differences between output of this file it is more useful to sort the list regardless of compiled-in/compiled-out.
This commit is contained in:
parent
9d768c0843
commit
3784841eaa
|
@ -378,11 +378,20 @@ class ExtractFeatures(object):
|
||||||
|
|
||||||
ret = ""
|
ret = ""
|
||||||
|
|
||||||
for compiled_in_feature_define in sorted(compiled_in_feature_defines):
|
combined = {}
|
||||||
ret += compiled_in_feature_define + "\n"
|
for define in sorted(compiled_in_feature_defines):
|
||||||
for remaining in sorted(not_compiled_in_feature_defines):
|
combined[define] = True
|
||||||
ret += "!" + remaining + "\n"
|
for define in sorted(not_compiled_in_feature_defines):
|
||||||
|
combined[define] = False
|
||||||
|
|
||||||
|
def squash_hal_to_ap(a):
|
||||||
|
return re.sub("^HAL_", "AP_", a)
|
||||||
|
|
||||||
|
for define in sorted(combined.keys(), key=squash_hal_to_ap):
|
||||||
|
bang = ""
|
||||||
|
if not combined[define]:
|
||||||
|
bang = "!"
|
||||||
|
ret += bang + define + "\n"
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
|
Loading…
Reference in New Issue