コード例 #1
0
 protected int GetInt(byte left, byte right)
 {
     byte[] bytes = new byte[2];
     bytes[0] = left;
     bytes[1] = right;
     Bits bits = new Bits(bytes);
     return bits.ToInt();
 }
コード例 #2
0
ファイル: NavigationReader.cs プロジェクト: fishxz/omni-bot
 private byte[] FromInt(int val)
 {
     Bits bits = new Bits(val, 16);
     byte[] bytes = bits.ToBytes();
     byte[] newBytes = new byte[2];
     newBytes[0] = bytes[1];
     newBytes[1] = bytes[0];
     return newBytes;
 }
コード例 #3
0
 protected byte[] FromInt(int val)
 {
     Bits bits = new Bits(val, 16);
     return bits.ToBytes();
 }
コード例 #4
0
        protected byte[] FromInt(int val)
        {
            Bits bits = new Bits(val, 16);

            return(bits.ToBytes());
        }