test/example-gatt-server: Fix few copy-paste errors
PATCH 1/2 test/example-gatt-server: Fix few copy-paste errors
--- test/example-gatt-server | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
test/example-gatt-server +5 -5
@@ -535,11 +535,11 @@ class TestEncryptCharacteristic(Characteristic): CharacteristicUserDescriptionDescriptor(bus, 3, self)) def ReadValue(self, options): - print('TestCharacteristic Read: ' + repr(self.value)) + print('TestEncryptCharacteristic Read: ' + repr(self.value)) return self.value def WriteValue(self, value, options): - print('TestCharacteristic Write: ' + repr(value)) + print('TestEncryptCharacteristic Write: ' + repr(value)) self.value = value class TestEncryptDescriptor(Descriptor):
@@ -576,16 +576,16 @@ class TestSecureCharacteristic(Characteristic): ['secure-read', 'secure-write'], service) self.value = [] - self.add_descriptor(TestEncryptDescriptor(bus, 2, self)) + self.add_descriptor(TestSecureDescriptor(bus, 2, self)) self.add_descriptor( CharacteristicUserDescriptionDescriptor(bus, 3, self)) def ReadValue(self, options): - print('TestCharacteristic Read: ' + repr(self.value)) + print('TestSecureCharacteristic Read: ' + repr(self.value)) return self.value def WriteValue(self, value, options): - print('TestCharacteristic Write: ' + repr(value)) + print('TestSecureCharacteristic Write: ' + repr(value)) self.value = value
Signature · 1 line
2.7.4
PATCH 2/2 test/example-gatt-server: Make test service primary
This allows to test from Android until included services support is added.
--- test/example-gatt-server | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
test/example-gatt-server +1 -1
@@ -438,7 +438,7 @@ class TestService(Service): TEST_SVC_UUID = '12345678-1234-5678-1234-56789abcdef0' def __init__(self, bus, index): - Service.__init__(self, bus, index, self.TEST_SVC_UUID, False) + Service.__init__(self, bus, index, self.TEST_SVC_UUID, True) self.add_characteristic(TestCharacteristic(bus, 0, self)) self.add_characteristic(TestEncryptCharacteristic(bus, 1, self)) self.add_characteristic(TestSecureCharacteristic(bus, 2, self))
Signature · 1 line
2.7.4
Hi Szymon,
Quoted 43 lines · Szymon Janc
--- test/example-gatt-server | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)test/example-gatt-server +5
-6@@ -535,11 +535,11 @@ class TestEncryptCharacteristic(Characteristic): CharacteristicUserDescriptionDescriptor(bus, 3, self)) def ReadValue(self, options): - print('TestCharacteristic Read: ' + repr(self.value)) + print('TestEncryptCharacteristic Read: ' + repr(self.value)) return self.value def WriteValue(self, value, options): - print('TestCharacteristic Write: ' + repr(value)) + print('TestEncryptCharacteristic Write: ' + repr(value)) self.value = value class TestEncryptDescriptor(Descriptor):@@ -576,16 +576,16 @@ class TestSecureCharacteristic(Characteristic): ['secure-read', 'secure-write'], service) self.value = [] - self.add_descriptor(TestEncryptDescriptor(bus, 2, self)) + self.add_descriptor(TestSecureDescriptor(bus, 2, self)) self.add_descriptor( CharacteristicUserDescriptionDescriptor(bus, 3, self)) def ReadValue(self, options): - print('TestCharacteristic Read: ' + repr(self.value)) + print('TestSecureCharacteristic Read: ' + repr(self.value)) return self.value def WriteValue(self, value, options): - print('TestCharacteristic Write: ' + repr(value)) + print('TestSecureCharacteristic Write: ' + repr(value)) self.value = value --
Quoted 1 line
2.7.4
Applied, thanks.
Signature · 1 line
Luiz Augusto von Dentz