Skip to content

Commit c1378ed

Browse files
committed
Use sbyte for ranging data also in Eddystone URL frames.
1 parent 835ab58 commit c1378ed

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,8 @@ To try the Windows 10 example app, download the complete library package from th
167167

168168
## Version History
169169

170-
### 1.8.0 - February 2016
171-
* Use sbyte instead of byte for accessing ranging data in Eddystone UID frames to ease development and remove the need for manual casting.
170+
### 1.8.1 - February 2016
171+
* Use sbyte instead of byte for accessing ranging data in Eddystone UID and URL frames to ease development and remove the need for manual casting.
172172

173173
### 1.7.0 - January 2016
174174
* Added translations to Chinese, French, Russian and Portuguese

UniversalBeaconLibrary/Beacon/UrlEddystoneFrame.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ namespace UniversalBeaconLibrary.Beacon
3131
/// </summary>
3232
public class UrlEddystoneFrame : BeaconFrameBase
3333
{
34-
private byte _rangingData;
34+
private sbyte _rangingData;
3535

3636
/// <summary>
3737
/// Tx power level - the received power level at 0 m, in dBm.
3838
/// Values range from -100 to +20 dBM, with a resolution of 1 dBm.
3939
/// Signed 8 bit integer according to:
4040
/// https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.tx_power_level.xml
4141
/// </summary>
42-
public byte RangingData
42+
public sbyte RangingData
4343
{
4444
get { return _rangingData; }
4545
set
@@ -103,7 +103,7 @@ public string CompleteUrl
103103
{3, "https://"}
104104
};
105105

106-
public UrlEddystoneFrame(byte rangingData, string completeUrl)
106+
public UrlEddystoneFrame(sbyte rangingData, string completeUrl)
107107
{
108108
_rangingData = rangingData;
109109
_completeUrl = completeUrl;
@@ -124,7 +124,7 @@ public void ParsePayload()
124124
if (!IsValid()) return;
125125

126126
// Ranging data
127-
var newRangingData = Payload[BeaconFrameHelper.EddystoneHeaderSize];
127+
var newRangingData = (sbyte)Payload[BeaconFrameHelper.EddystoneHeaderSize];
128128
if (newRangingData != RangingData)
129129
{
130130
_rangingData = newRangingData;
@@ -169,7 +169,7 @@ private void UpdatePayload()
169169
// Frame header
170170
ms.Write(header, 0, header.Length);
171171
// Ranging data
172-
ms.WriteByte(RangingData);
172+
ms.WriteByte((byte)RangingData);
173173
// URL scheme byte
174174
ms.WriteByte((byte)urlSchemeByte);
175175
// Encoded URL

UniversalBeaconLibrary/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
// You can specify all the values or you can default the Build and Revision Numbers
2525
// by using the '*' as shown below:
2626
// [assembly: AssemblyVersion("1.0.*")]
27-
[assembly: AssemblyVersion("1.6.0.0")]
28-
[assembly: AssemblyFileVersion("1.6.0.0")]
27+
[assembly: AssemblyVersion("1.8.1.0")]
28+
[assembly: AssemblyFileVersion("1.8.1.0")]
2929
[assembly: ComVisible(false)]

UniversalBeaconLibrary/UniversalBeaconLibrary.nuspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
33
<metadata minClientVersion="3.0">
44
<id>UniversalBeaconLibrary</id>
5-
<version>1.8.0</version>
6-
<releaseNotes>Fix for correctly handling beacon advertisements that are null</releaseNotes>
5+
<version>1.8.1</version>
6+
<releaseNotes>Use sbyte instead of byte for accessing ranging data in Eddystone UID and URL frames to ease development and remove the need for manual casting.</releaseNotes>
77
<title>Universal Beacon Library for the Universal Windows Platform (Windows 10 UWP)</title>
88
<authors>Andreas Jakl</authors>
99
<owners>Andreas Jakl</owners>

WindowsBeacons/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" IgnorableNamespaces="uap mp">
3-
<Identity Name="39745AndreasJakl.BluetoothBeaconInteractor" Publisher="CN=AA09B9A0-DEBB-4495-BAA8-7D2028458E75" Version="1.8.24.0" />
3+
<Identity Name="39745AndreasJakl.BluetoothBeaconInteractor" Publisher="CN=AA09B9A0-DEBB-4495-BAA8-7D2028458E75" Version="1.8.26.0" />
44
<mp:PhoneIdentity PhoneProductId="27f10f31-b0a2-48e3-96e6-5d89c3d36518" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
55
<Properties>
66
<DisplayName>Bluetooth Beacon Interactor</DisplayName>

WindowsBeacons/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
// You can specify all the values or you can default the Build and Revision Numbers
2525
// by using the '*' as shown below:
2626
// [assembly: AssemblyVersion("1.0.*")]
27-
[assembly: AssemblyVersion("1.8.0.0")]
28-
[assembly: AssemblyFileVersion("1.8.0.0")]
27+
[assembly: AssemblyVersion("1.8.1.0")]
28+
[assembly: AssemblyFileVersion("1.8.1.0")]
2929
[assembly: ComVisible(false)]

WindowsBeacons/WindowsBeacons.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<AssemblyName>WindowsBeacons</AssemblyName>
1212
<DefaultLanguage>en-US</DefaultLanguage>
1313
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
14-
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
14+
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
1515
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
1616
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
1717
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>

0 commit comments

Comments
 (0)