Skip to content

Commit

Permalink
Use sbyte for ranging data also in Eddystone URL frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
andijakl committed Feb 9, 2016
1 parent 835ab58 commit c1378ed
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ To try the Windows 10 example app, download the complete library package from th

## Version History

### 1.8.0 - February 2016
* Use sbyte instead of byte for accessing ranging data in Eddystone UID frames to ease development and remove the need for manual casting.
### 1.8.1 - February 2016
* 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.

### 1.7.0 - January 2016
* Added translations to Chinese, French, Russian and Portuguese
Expand Down
10 changes: 5 additions & 5 deletions UniversalBeaconLibrary/Beacon/UrlEddystoneFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ namespace UniversalBeaconLibrary.Beacon
/// </summary>
public class UrlEddystoneFrame : BeaconFrameBase
{
private byte _rangingData;
private sbyte _rangingData;

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

public UrlEddystoneFrame(byte rangingData, string completeUrl)
public UrlEddystoneFrame(sbyte rangingData, string completeUrl)
{
_rangingData = rangingData;
_completeUrl = completeUrl;
Expand All @@ -124,7 +124,7 @@ public void ParsePayload()
if (!IsValid()) return;

// Ranging data
var newRangingData = Payload[BeaconFrameHelper.EddystoneHeaderSize];
var newRangingData = (sbyte)Payload[BeaconFrameHelper.EddystoneHeaderSize];
if (newRangingData != RangingData)
{
_rangingData = newRangingData;
Expand Down Expand Up @@ -169,7 +169,7 @@ private void UpdatePayload()
// Frame header
ms.Write(header, 0, header.Length);
// Ranging data
ms.WriteByte(RangingData);
ms.WriteByte((byte)RangingData);
// URL scheme byte
ms.WriteByte((byte)urlSchemeByte);
// Encoded URL
Expand Down
4 changes: 2 additions & 2 deletions UniversalBeaconLibrary/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.6.0.0")]
[assembly: AssemblyFileVersion("1.6.0.0")]
[assembly: AssemblyVersion("1.8.1.0")]
[assembly: AssemblyFileVersion("1.8.1.0")]
[assembly: ComVisible(false)]
4 changes: 2 additions & 2 deletions UniversalBeaconLibrary/UniversalBeaconLibrary.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<package xmlns="http://schemas.microsoft.com/packaging/2013/01/nuspec.xsd">
<metadata minClientVersion="3.0">
<id>UniversalBeaconLibrary</id>
<version>1.8.0</version>
<releaseNotes>Fix for correctly handling beacon advertisements that are null</releaseNotes>
<version>1.8.1</version>
<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>
<title>Universal Beacon Library for the Universal Windows Platform (Windows 10 UWP)</title>
<authors>Andreas Jakl</authors>
<owners>Andreas Jakl</owners>
Expand Down
2 changes: 1 addition & 1 deletion WindowsBeacons/Package.appxmanifest
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<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">
<Identity Name="39745AndreasJakl.BluetoothBeaconInteractor" Publisher="CN=AA09B9A0-DEBB-4495-BAA8-7D2028458E75" Version="1.8.24.0" />
<Identity Name="39745AndreasJakl.BluetoothBeaconInteractor" Publisher="CN=AA09B9A0-DEBB-4495-BAA8-7D2028458E75" Version="1.8.26.0" />
<mp:PhoneIdentity PhoneProductId="27f10f31-b0a2-48e3-96e6-5d89c3d36518" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Bluetooth Beacon Interactor</DisplayName>
Expand Down
4 changes: 2 additions & 2 deletions WindowsBeacons/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.8.0.0")]
[assembly: AssemblyFileVersion("1.8.0.0")]
[assembly: AssemblyVersion("1.8.1.0")]
[assembly: AssemblyFileVersion("1.8.1.0")]
[assembly: ComVisible(false)]
2 changes: 1 addition & 1 deletion WindowsBeacons/WindowsBeacons.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>WindowsBeacons</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.10240.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.10586.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
Expand Down

0 comments on commit c1378ed

Please sign in to comment.