diff options
author | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2024-01-27 16:42:17 +0000 |
---|---|---|
committer | Martin Mathieson <martin.r.mathieson@googlemail.com> | 2024-01-27 16:42:17 +0000 |
commit | 7b58f822289228e0706b24fc93cb801ca27ecf42 (patch) | |
tree | 45374118ce3b7b84c28966b64d6d079eba265e45 /tools | |
parent | f3216e8c4a82deb887b9d56b7aaf2f49d7abb5d2 (diff) |
Set BASE_NONE for FT_BOOLEAN items with zero mask
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/check_typed_item_calls.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/check_typed_item_calls.py b/tools/check_typed_item_calls.py index eeee75d8e9..d7683cc19d 100755 --- a/tools/check_typed_item_calls.py +++ b/tools/check_typed_item_calls.py @@ -1258,8 +1258,8 @@ class Item: def check_boolean_length(self): global errors_found - # If mask is 0, display must be BASE_NONE. TODO: modify test to use self.display != 'BASE_NONE' ! - if self.item_type == 'FT_BOOLEAN' and self.mask_read and self.mask_value == 0 and self.display_value != 0: + # If mask is 0, display must be BASE_NONE. + if self.item_type == 'FT_BOOLEAN' and self.mask_read and self.mask_value == 0 and self.display != 'BASE_NONE': print('Error:', self.filename, self.hf, 'type is FT_BOOLEAN, no mask set (', self.mask, ') - display should be BASE_NONE, is instead', self.display) errors_found += 1 # TODO: check for length > 64? @@ -1442,7 +1442,7 @@ def isGeneratedFile(filename): def find_macros(filename): # Pre-populate with some useful values.. - macros = { 'BASE_NONE' : 0 } + macros = { 'BASE_NONE' : 0, 'BASE_DEC' : 1 } with open(filename, 'r', encoding="utf8") as f: contents = f.read() |