From eda7dff54d16a5c10b49e1f41bfcb4a37e2b3381 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 22 Jun 2021 13:17:46 +1000 Subject: [PATCH] Tools: param_metadata: disallow @Values and @Bitmask at same time --- Tools/autotest/param_metadata/param_parse.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tools/autotest/param_metadata/param_parse.py b/Tools/autotest/param_metadata/param_parse.py index db50690c6e..e9e011b39c 100755 --- a/Tools/autotest/param_metadata/param_parse.py +++ b/Tools/autotest/param_metadata/param_parse.py @@ -276,6 +276,10 @@ def process_library(vehicle, library, pathprefix=None): value = re.sub('@PREFIX@', library.name, field[2]) setattr(p, field[0], value) + if (getattr(p, 'Values', None) is not None and + getattr(p, 'Bitmask', None) is not None): + error("Both @Values and @Bitmask present") + if (getattr(p, 'Values', None) is None and getattr(p, 'Bitmask', None) is None): # values and Bitmask available for this vehicle