tool/compile_gatt.py: support dynamic descriptors for environmental sensing

This commit is contained in:
Matthias Ringwald 2021-02-11 10:46:58 +01:00
parent 17215335f5
commit 6f08f1597c
2 changed files with 14 additions and 15 deletions

View File

@ -945,9 +945,9 @@ def parseLines(fname_in, fin, fout):
parseCharacteristicAggregateFormat(fout, parts)
continue
# 2906
# 2906
if parts[0] == 'VALID_RANGE':
print("WARNING: %s not implemented yet\n" % (parts[0]))
parseGenericDynamicReadOnlyDescriptor(fout, parts, 0x2906, 'VALID_RANGE')
continue
# 2907
@ -967,27 +967,22 @@ def parseLines(fname_in, fin, fout):
# 290A
if parts[0] == 'VALUE_TRIGGER_SETTING':
print("WARNING: %s not implemented yet\n" % (parts[0]))
parseGenericDynamicDescriptor(fout, parts, 0x290A, 'VALUE_TRIGGER_SETTING')
continue
# 290B
if parts[0] == 'ENVIRONMENTAL_SENSING_CONFIGURATION':
print("WARNING: %s not implemented yet\n" % (parts[0]))
parseGenericDynamicDescriptor(fout, parts, 0x290B, 'ENVIRONMENTAL_SENSING_CONFIGURATION')
continue
# 290C
if parts[0] == 'ENVIRONMENTAL_SENSING_MEASUREMENT':
print("WARNING: %s not implemented yet\n" % (parts[0]))
parseGenericDynamicReadOnlyDescriptor(fout, parts, 0x290C, 'ENVIRONMENTAL_SENSING_MEASUREMENT')
continue
# 290D
if parts[0] == 'ENVIRONMENTAL_SENSING_TRIGGER_SETTING':
print("WARNING: %s not implemented yet\n" % (parts[0]))
continue
# 2906
if parts[0] == 'VALID_RANGE':
print("WARNING: %s not implemented yet\n" % (parts[0]))
parseGenericDynamicDescriptor(fout, parts, 0x290D, 'ENVIRONMENTAL_SENSING_TRIGGER_SETTING')
continue
print("WARNING: unknown token: %s\n" % (parts[0]))

View File

@ -216,7 +216,8 @@ def convert_service(fout, specification_type):
continue
if (type == 'org.bluetooth.descriptor.valid_range'):
print('-- Descriptor %-40s - WARNING: VALID_RANGE not supported yet' % name)
print('-- Descriptor %-40s' % name)
fout.write('VALID_RANGE, %s,\n' % properties)
continue
if (type == 'org.bluetooth.descriptor.external_report_reference'):
@ -237,15 +238,18 @@ def convert_service(fout, specification_type):
continue
if (type == 'org.bluetooth.descriptor.es_configuration'):
print('-- Descriptor %-40s - WARNING: ENVIRONMENTAL_SENSING_CONFIGURATION not supported yet' % name)
print('-- Descriptor %-40s' % name)
fout.write('ENVIRONMENTAL_SENSING_CONFIGURATION, %s,\n' % properties)
continue
if (type == 'org.bluetooth.descriptor.es_measurement'):
print('-- Descriptor %-40s - WARNING: ENVIRONMENTAL_SENSING_MEASUREMENT not supported yet' % name)
print('-- Descriptor %-40s' % name)
fout.write('ENVIRONMENTAL_SENSING_MEASUREMENT, %s,\n' % properties)
continue
if (type == 'org.bluetooth.descriptor.es_trigger_setting'):
print('-- Descriptor %-40s - WARNING: ENVIRONMENTAL_SENSING_TRIGGER_SETTING not supported yet' % name)
print('-- Descriptor %-40s' % name)
fout.write('ENVIRONMENTAL_SENSING_TRIGGER_SETTING, %s,\n' % properties)
continue
if (type == 'org.bluetooth.descriptor.gatt.characteristic_extended_properties'):