Skip to content

Commit

Permalink
Snapshot of api v0.4.15
Browse files Browse the repository at this point in the history
  • Loading branch information
scaryghost committed Apr 3, 2016
1 parent ecff950 commit 11eba9d
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "MetaWear C++ API"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 0.4.12
PROJECT_NUMBER = 0.4.15

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ dist/
└── lib
└── x64
├── libmetawear.so -> libmetawear.so.0
├── libmetawear.so.0 -> libmetawear.so.0.4.12
└── libmetawear.so.0.4.12
├── libmetawear.so.0 -> libmetawear.so.0.4.15
└── libmetawear.so.0.4.15

```

Expand Down
4 changes: 2 additions & 2 deletions project_version.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION=0.4.11
VERSION=0.4.15
VERSION_MAJOR=0
VERSION_MINOR=4
VERSION_STEP=11
VERSION_STEP=15
2 changes: 1 addition & 1 deletion wrapper/csharp/Functions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public sealed class Functions {
/// <param name="board">Pointer to the board to send the command to</param>
/// <param name="ad_uuid">Byte representation of the UUID in little endian ordering</param>
[DllImport(METAWEAR_DLL, CallingConvention = CallingConvention.Cdecl)]
public static extern void mbl_mw_ibeacon_set_uuid(IntPtr board, byte ad_uuid);
public static extern void mbl_mw_ibeacon_set_uuid(IntPtr board, byte[] ad_uuid);

/// <summary>
/// Enables iBeacon mode. You will need to disconnect from the board to advertise as an iBeacon
Expand Down
16 changes: 15 additions & 1 deletion wrapper/csharp/Peripheral.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
using System;
using System.Runtime.InteropServices;

namespace MbientLab.MetaWear.Peripheral {
public class IBeacon {
public static byte[] GuidToByteArray(Guid guid) {
byte[] guidBytes = guid.ToByteArray();

// Implementation taken from SO: http://stackoverflow.com/a/16722909
Array.Reverse(guidBytes, 0, 4);
Array.Reverse(guidBytes, 4, 2);
Array.Reverse(guidBytes, 6, 4);
Array.Reverse(guidBytes);
return guidBytes;
}
}

public class Led {
public const byte REPEAT_INDEFINITELY = 0xff;

Expand Down Expand Up @@ -41,4 +55,4 @@ public enum Direction {
AWAY
}
}
}
}

0 comments on commit 11eba9d

Please sign in to comment.