Skip to content

Commit

Permalink
Documentation Fixes, Changed mac dylib to bundle (Unity Compatible)
Browse files Browse the repository at this point in the history
  • Loading branch information
Flafla2 committed Aug 28, 2015
1 parent 75ddce2 commit fdd46ea
Show file tree
Hide file tree
Showing 13 changed files with 470 additions and 45 deletions.
68 changes: 68 additions & 0 deletions Assets/Wiimote/Plugins/mac/hidapi.bundle.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Wiimote/Plugins/mac/hidapi.bundle/Contents.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 42 additions & 0 deletions Assets/Wiimote/Plugins/mac/hidapi.bundle/Contents/Info.plist
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>14F27</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>hidapi</string>
<key>CFBundleIdentifier</key>
<string>com.signal11.hidapi</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>hidapi</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>6E35b</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>14D125</string>
<key>DTSDKName</key>
<string>macosx10.10</string>
<key>DTXcode</key>
<string>0640</string>
<key>DTXcodeBuild</key>
<string>6E35b</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 signal11. All rights reserved.</string>
</dict>
</plist>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Assets/Wiimote/Plugins/mac/hidapi.bundle/Contents/MacOS.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file not shown.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file removed Assets/Wiimote/Plugins/mac/libhidapi.dylib
Binary file not shown.
7 changes: 6 additions & 1 deletion Assets/Wiimote/Scripts/Wiimote.cs
Expand Up @@ -58,6 +58,11 @@ public class Wiimote
}
}

/// If this Wiimote is a Wii U Pro Controller,
/// this contains all relevant Pro Controller data as it is reported by
/// the Controller. If this Wiimote is not a Wii U Pro Controller, this is \c null.
///
/// \sa current_ext
public WiiUProData WiiUPro {
get {
if(current_ext == ExtensionController.WIIU_PRO)
Expand Down Expand Up @@ -494,7 +499,7 @@ public int SendStatusInfoRequest()
///
/// Reading from the Wii Remote's internal registers can give important data not available through normal output reports.
/// This can, for example, be used to read saved Mii data from the Wii Remote's EEPROM registers. It is also used by some
/// of WiimoteApi's setup functions (RequestIdentifyExtension() for example).
/// of WiimoteApi's setup functions.
///
/// If you use this incorrectly (for example, if you attempt to read from an invalid block of data), \c Responder will not be called.
public int SendRegisterReadRequest(RegisterType type, int offset, int size, ReadResponder Responder)
Expand Down
16 changes: 8 additions & 8 deletions Assets/Wiimote/Scripts/WiimoteData/AccelData.cs
Expand Up @@ -10,11 +10,11 @@ public class AccelData : WiimoteData
/// This is only updated if the Wii Remote has a report mode that supports
/// the Accelerometer.
///
/// Range: 0 - 1024
/// The sign of the directions below are with respect to the zero point of the accelerometer:
/// Up/Down: +Z/-Z
/// Left/Right: +X/-X
/// Forward/Backward: -Y/+Y
/// Range: 0 - 1024\n
/// *The sign of the directions below are with respect to the zero point of the accelerometer:*\n
/// Up/Down: +Z/-Z\n
/// Left/Right: +X/-X\n
/// Forward/Backward: -Y/+Y\n
public ReadOnlyArray<int> accel { get { return _accel_readonly; } }
private ReadOnlyArray<int> _accel_readonly;
private int[] _accel;
Expand Down Expand Up @@ -107,9 +107,9 @@ public float[] GetAccelZeroPoints()
/// These values are in Wii Remote coordinates (in the direction of gravity)
/// \sa CalibrateAccel(), GetAccelZeroPoints(), accel, accel_calib
///
/// Range: -1 to 1
/// Up/Down: +Z/-Z
/// Left/Right: +X/-X
/// Range: -1 to 1\n
/// Up/Down: +Z/-Z\n
/// Left/Right: +X/-X\n
/// Forward/Backward: -Y/+Y
public float[] GetCalibratedAccelData()
{
Expand Down
19 changes: 10 additions & 9 deletions Assets/Wiimote/Scripts/WiimoteData/IRData.cs
Expand Up @@ -12,12 +12,12 @@ public class IRData : WiimoteData
///
/// This is only updated if the Wii Remote has a report mode with IR
///
/// | Position X | Position Y | Size | X min | Y min | X max | Y max | Intensity
/// ------ | ---------- | ---------- | ------ | ------- | ------- | ------- | ------- | ---------
/// Range: | 0 - 1023 | 0 - 767 | 0 - 15 | 0 - 127 | 0 - 127 | 0 - 127 | 0 - 127 | 0 - 256
/// Index: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7
/// | | Position X | Position Y | Size | X min | Y min | X max | Y max | Intensity |
/// |------ | ---------- | ---------- | ------ | ------- | ------- | ------- | ------- | --------- |
/// |Range: | 0 - 1023 | 0 - 767 | 0 - 15 | 0 - 127 | 0 - 127 | 0 - 127 | 0 - 127 | 0 - 256 |
/// |Index: | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
///
/// int[dot index, x (0) / y (1) / size (2) / xmin (3) / ymin (4) / xmax (5) / ymax (6) / intensity (7)]
/// \code int[dot index, x (0) / y (1) / size (2) / xmin (3) / ymin (4) / xmax (5) / ymax (6) / intensity (7)] \endcode
///
/// \sa IRDataType, Wiimote::SetupIRCamera(IRDataType)
public ReadOnlyMatrix<int> ir { get { return _ir_readonly; } }
Expand Down Expand Up @@ -221,10 +221,11 @@ public float[] GetIRMidpoint(bool predict = true)
/// \brief Attempts to identify which of the four IR "dots" reported by the Wii Remote are from the Wii sensor bar.
/// \param predict If true, and one of the dots is outside of the Wii Remote's field of view,
/// WiimoteApi will attempt to predict the other dot's position outside of the screen (default true).
/// \return First Dimension: Index of detected IR dot.
/// Second Dimension: 0: X, 1: Y, 2: Index in \link ir (or -1 if predicted)
/// Size: 2x3
/// Range: 0-1 with respect to the Wii Remote Camera dimensions. If \c predict is true this may be outside of that range.
///
/// \returns First Dimension: Index of detected IR dot.\n
/// Second Dimension: 0: X, 1: Y, 2: Index in \link ir \endlink (or -1 if predicted)\n
/// Size: 2x3\n
/// Range: 0-1 with respect to the Wii Remote Camera dimensions. If \c predict is true this may be outside of that range.
public float[,] GetProbableSensorBarIR(bool predict = true)
{
// If necessary, change the current "sensor bar" IR indices to new ones. This happens if one of the dots went out of focus and a new one took its place.
Expand Down
6 changes: 3 additions & 3 deletions Assets/Wiimote/Scripts/WiimoteManager.cs
Expand Up @@ -9,9 +9,9 @@ namespace WiimoteApi {

public class WiimoteManager
{
public const ushort vendor_id_wiimote = 0x057e;
public const ushort product_id_wiimote = 0x0306;
public const ushort product_id_wiimoteplus = 0x0330;
private const ushort vendor_id_wiimote = 0x057e;
private const ushort product_id_wiimote = 0x0306;
private const ushort product_id_wiimoteplus = 0x0330;

/// A list of all currently connected Wii Remotes.
public static List<Wiimote> Wiimotes { get { return _Wiimotes; } }
Expand Down

0 comments on commit fdd46ea

Please sign in to comment.