Compare commits
2 Commits
a50a7ec97e
...
7c2a102bee
| Author | SHA1 | Date | |
|---|---|---|---|
| 7c2a102bee | |||
| 15e3e5a82a |
@@ -353,7 +353,7 @@ namespace WaveshareUARTFingerprintSensor
|
||||
{
|
||||
(byte high, byte low) = Utils.Split(userID);
|
||||
|
||||
if (TrySendAndReceive(CommandType.Comparison11, high, low, 0, out var response, 1000))
|
||||
if (TrySendAndReceive(CommandType.Comparison11, high, low, 0, out var response))
|
||||
{
|
||||
return response.responseType == ResponseType.Success;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ namespace WaveshareUARTFingerprintSensor
|
||||
/// <returns></returns>
|
||||
public bool TryComparison1N(out (ushort userID, UserPermission permission) userInfo)
|
||||
{
|
||||
if (TrySendAndReceive(CommandType.Comparison1N, 0, 0, 0, out var response, 1000))
|
||||
if (TrySendAndReceive(CommandType.Comparison1N, 0, 0, 0, out var response))
|
||||
{
|
||||
if (response.responseType != ResponseType.NoUser && response.responseType != ResponseType.Timeout)
|
||||
{
|
||||
@@ -510,7 +510,11 @@ namespace WaveshareUARTFingerprintSensor
|
||||
public void Wake()
|
||||
{
|
||||
_sleeping = false;
|
||||
_rstPin.Write(GpioPinValue.High);
|
||||
_rstPin.Write(GpioPinValue.High);
|
||||
|
||||
// Needed after wake to really wake the sensor
|
||||
// Because the first command always fail for whatever reason
|
||||
TryGetUserCount(out var _);
|
||||
}
|
||||
|
||||
private void OnWake()
|
||||
|
||||
Reference in New Issue
Block a user