2 커밋 5e059babab ... cbe0c84eb8

작성자 SHA1 메시지 날짜
  龙三郎 cbe0c84eb8 Merge branch 'master' of http://192.168.100.32:3000/wulianwei/NIM_DSP6748 2 달 전
  龙三郎 4c303e7a80 修改协议长度错误 2 달 전
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      code/hlx/tr_protocol.c

+ 2 - 2
code/hlx/tr_protocol.c

@@ -126,11 +126,11 @@ void ProtocolSetPayloadString(trProtocol* protocol, const char* payloadString) {
 }
 // ´ň°ü
 void ProtocolPackage(trProtocol* protocol) {
-    protocol->message[6] = protocol->length >> 8 & 0xFF;
-    protocol->message[7] = protocol->length & 0xFF;
     uint16_t crc = CalCRC16(protocol->message, protocol->length);
     protocol->message[protocol->length++] = crc >> 8 & 0xFF;
     protocol->message[protocol->length++] = crc & 0xFF;
+    protocol->message[6] = protocol->length >> 8 & 0xFF;
+    protocol->message[7] = protocol->length & 0xFF;
 }