Private Sub GetStatusBits()
Dim Digit As Integer
Dim nSpO2_StatusBit(7) As Integer 'used for DF1 also
im nSpO2_Status As Integer 'Use for DF1 also
Dim nStat2 As Integer
'CONVERT SPO2 STATUS BYTE TO BINARY BYTE ARRAY
For Digit = 7 To 0 Step -1
If (nSpO2_Status And (2 ^ Digit)) Then
nSpO2_StatusBit(Digit) = 1
Else
nSpO2_StatusBit(Digit) = 0
End If
If (nStat2 And (2 ^ Digit)) Then
nStat2Bit(Digit) = 1
Else
nStat2Bit(Digit) = 0
End If
Next Digit
End Sub
private void GetStatusBits()
{
int Digit = 0;
//CONVERT SPO2 STATUS BYTE TO BINARY BYTE ARRAY
for (Digit = 7; Digit >= 0; Digit += -1)
{
if ((nSpO2_Status )& (Math.Pow(2, Digit))))
{
nSpO2_StatusBit[Digit] = 1;
}
else
{
nSpO2_StatusBit[Digit] = 0;
}
if ((nStat2 = 0) // & (Math.Pow(2, Digit))))
{
nStat2Bit[Digit] = 1;
}
else
{
nStat2Bit[Digit] = 0;
}
}
}
private void GetStatusBits()
{
int Digit = 0;
int[] nSpO2_StatusBit = new int[7];
int nSpO2_Status;
int nStat2;
//CONVERT SPO2 STATUS BYTE TO BINARY BYTE ARRAY
for (Digit = 7; Digit >= 0; Digit += -1)
{
if (((nSpO2_Status) & ((int)Math.Pow(2, Digit))) != 0)
{
nSpO2_StatusBit[Digit] = 1;
}
else
{
nSpO2_StatusBit[Digit] = 0;
}
if ((nStat2 & ((int)Math.Pow(2, Digit))) != 0)
{
nStat2Bit[Digit] = 1;
}
else
{
nStat2Bit[Digit] = 0;
}
}
}
int[] nSpO2_StatusBit = new int[8];
Title | # Comments | Views | Activity |
---|---|---|---|
Duplicate a row | 2 | 28 | |
Create a form which is copy of a form in vb.net | 2 | 16 | |
As soon as i click a button on the form,it mnimises. | 11 | 19 | |
fomat Json objects | 6 | 14 |
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
13 Experts available now in Live!