diff --git a/Tools/Carbonix_scripts/param_auto_test.py b/Tools/Carbonix_scripts/param_auto_test.py index cdf98ded60..8e3124078f 100644 --- a/Tools/Carbonix_scripts/param_auto_test.py +++ b/Tools/Carbonix_scripts/param_auto_test.py @@ -173,13 +173,16 @@ ) return_status = 1 elif param_type == 'bitmask': - # Check if the parameter value is in the list of values - if param_value not in param_values: - print( - f"Parameter '{param_name}' has an " - f"invalid value: {param_value}" - ) - return_status = 1 + # Check if the all set bits correspond to something + param_value = int(param_value) + for i in range(32): + if (param_value >> i) & 1: + if i not in param_values: + print( + f"Parameter '{param_name}' has an " + f"invalid bitmask value: {param_value}" + ) + return_status = 1 else: print( f"Parameter '{param_name}' has no "