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 = ""
|
||||
|
||||
for compiled_in_feature_define in sorted(compiled_in_feature_defines):
|
||||
ret += compiled_in_feature_define + "\n"
|
||||
for remaining in sorted(not_compiled_in_feature_defines):
|
||||
ret += "!" + remaining + "\n"
|
||||
combined = {}
|
||||
for define in sorted(compiled_in_feature_defines):
|
||||
combined[define] = True
|
||||
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
|
||||
|
||||
def run(self):
|
||||
|
|
Loading…
Reference in New Issue