Minor hands detection change

Update to latest LeapCSharp
This commit is contained in:
SDraw 2022-03-26 15:08:44 +03:00
parent f6d16f25b7
commit 8c8b8d2e99
No known key found for this signature in database
GPG key ID: BB95B4DAB2BB8BB5
4 changed files with 58 additions and 18 deletions

View file

@ -497,6 +497,27 @@ namespace Leap
}
}
/// <summary>
/// Checks whether a minimum or required tracking service version is installed.
/// Gets the currently installed service version from the connection and checks whether
/// the argument minServiceVersion is smaller or equal to it
/// </summary>
/// <param name="minServiceVersion">The minimum service version to check against</param>
/// <returns></returns>
public bool CheckRequiredServiceVersion(LEAP_VERSION minServiceVersion)
{
LEAP_VERSION currentServiceVersion = _connection.GetCurrentServiceVersion();
// check that minServiceVersion is smaller or equal to the current service version
if (minServiceVersion.major < currentServiceVersion.major) return true;
else if (minServiceVersion.major == currentServiceVersion.major)
{
if (minServiceVersion.minor < currentServiceVersion.minor) return true;
else if (minServiceVersion.minor == currentServiceVersion.minor && minServiceVersion.patch <= currentServiceVersion.patch) return true;
}
return false;
}
/// <summary>
/// Requests setting a policy.
///