Skip to content

Commit 536168a

Browse files
authored
Updated version number while submitting to store and add short UUIDs in hex to characteristics (#59)
1 parent 721b4fa commit 536168a

3 files changed

Lines changed: 37 additions & 1 deletion

File tree

BluetoothLEExplorer/BluetoothLEExplorer/Models/ObservableGattCharacteristics.cs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,31 @@ public string UUID
251251
}
252252
}
253253

254+
/// <summary>
255+
/// Source for <see cref="ShortUUID"/>
256+
/// </summary>
257+
private string shortUuid;
258+
259+
/// <summary>
260+
/// Gets or sets the ShortUUID of this characteristic
261+
/// </summary>
262+
public string ShortUUID
263+
{
264+
get
265+
{
266+
return shortUuid;
267+
}
268+
269+
set
270+
{
271+
if (shortUuid != value)
272+
{
273+
shortUuid = value;
274+
OnPropertyChanged(new PropertyChangedEventArgs("ShortUUID"));
275+
}
276+
}
277+
}
278+
254279
/// <summary>
255280
/// Source for <see cref="Value"/>
256281
/// </summary>
@@ -321,6 +346,15 @@ public ObservableGattCharacteristics(GattCharacteristic characteristic, Observab
321346
Characteristic = characteristic;
322347
Parent = parent;
323348
Name = GattCharacteristicUuidHelper.ConvertUuidToName(characteristic.Uuid);
349+
var shortId = BluetoothUuidHelper.TryGetShortId(characteristic.Uuid);
350+
if (shortId.HasValue)
351+
{
352+
ShortUUID = "0x" + shortId.Value.ToString("X");
353+
}
354+
else
355+
{
356+
ShortUUID = "";
357+
}
324358
UUID = characteristic.Uuid.ToString();
325359
}
326360

BluetoothLEExplorer/BluetoothLEExplorer/Package.appxmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3">
3-
<Identity Name="Microsoft.BluetoothLEExplorer" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.15.0.0" />
3+
<Identity Name="Microsoft.BluetoothLEExplorer" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.16.1.0" />
44
<mp:PhoneIdentity PhoneProductId="8fce680c-fda2-4d28-8e68-9bb7d53f192f" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
55
<Properties>
66
<DisplayName>Bluetooth LE Explorer</DisplayName>

BluetoothLEExplorer/BluetoothLEExplorer/Views/DeviceServicesPage.xaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,8 @@
162162
<TextBlock TextWrapping="WrapWholeWords">
163163
<Run x:Name="CharacteristicText" Text="Characteristic Name:" />
164164
<Run Text="{x:Bind Name, Mode=OneWay}" FontWeight="Bold" />
165+
<Run x:Name="CharacteristicTextUUID" Text=" - Characteristic Short UUID:" />
166+
<Run Text="{x:Bind ShortUUID, Mode=OneWay}" FontWeight="Bold" />
165167
<Run Text=" - User Description: " />
166168
<Run x:Name="CharacteristicUserDescription" Text="{x:Bind Characteristic.UserDescription, Mode=OneWay}" />
167169
<Run Text=" - " />

0 commit comments

Comments
 (0)