Created
September 2, 2016 22:04
-
-
Save jrich523/b25aec9e4ef872fd3921712380cd4749 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((int) rt == 3) | |
{ | |
Report3 report3 = new Report3(); | |
int num = 66560 / inputReportBuffer.Length; | |
do | |
{ | |
Thread.Sleep(3); | |
if (this._deviceDetected) | |
{ | |
inputReportBuffer[0] = rt; | |
flag = this._myHid.GetInputReportViaControlTransfer(this._hidHandle, ref inputReportBuffer); | |
if (flag && inputReportBuffer.Length > 0) | |
report3.append(inputReportBuffer); | |
else | |
--num; | |
} | |
else | |
break; | |
} | |
while (!report3.IsFull && !report3.IsComplete && num >= 0); | |
if (report3.IsComplete) | |
reports = (Reports) report3; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool IsComplete | |
{ | |
get | |
{ | |
if (this.m_ridLoc[6] != 0) | |
return true; | |
for (int checkedCount = this.m_CheckedCount; checkedCount < this.m_RawCount - 7; ++checkedCount) | |
{ | |
++this.m_CheckedCount; | |
if ((int) this.m_RawHistory[checkedCount] == 170 && (int) this.m_RawHistory[checkedCount + 1] == 85) | |
{ | |
byte num = this.m_RawHistory[checkedCount + 2]; | |
if ((int) num > 0 && (int) num < 6) | |
this.m_ridLoc[(int) num] = checkedCount; | |
else if ((int) num == 6) | |
{ | |
this.m_ridLoc[(int) num] = checkedCount; | |
return true; | |
} | |
} | |
} | |
return false; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment