|
|
@@ -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;
|
|
|
}
|
|
|
|
|
|
|