예제 #1
0
파일: EV3Cmd.java 프로젝트: sovcik/EV3j
 // update message length in message header
 // (first two bytes formatted in Little Endian)
 private void updateMsgLength() {
   byte[] b2 =
       Common.short2LEshort(
           (short) (count - 2)); // message size excludes th first 2 bytes in which message size is
   // provided
   System.arraycopy(b2, 0, buf, 0, 2);
 }
예제 #2
0
파일: EV3Cmd.java 프로젝트: sovcik/EV3j
 // update message number in message header
 // (byte 3 & 4 formatted in Little Endian)
 public void setMsgNumber(short n) {
   byte[] b2 = Common.short2LEshort(n);
   System.arraycopy(b2, 0, buf, 2, 2);
 }