From 8c70002d7dc38f8fd3456017bf8fdef0182d791e Mon Sep 17 00:00:00 2001 From: Matthias Ringwald Date: Sun, 2 May 2021 18:37:04 +0200 Subject: [PATCH] tool/compile_gatt: fix error message for unknown presentation format identifier in aggregate format --- tool/compile_gatt.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tool/compile_gatt.py b/tool/compile_gatt.py index 9fd05b8c4..3a5dde651 100755 --- a/tool/compile_gatt.py +++ b/tool/compile_gatt.py @@ -751,10 +751,11 @@ def parseCharacteristicAggregateFormat(fout, parts): write_16(fout, handle) write_16(fout, 0x2905) for identifier in parts[1:]: - format_handle = presentation_formats[identifier] - if format == 0: + if not identifier in presentation_formats: + print(parts) print("ERROR: identifier '%s' in CHARACTERISTIC_AGGREGATE_FORMAT undefined" % identifier) sys.exit(1) + format_handle = presentation_formats[identifier] write_16(fout, format_handle) fout.write("\n")