fixed wrong payload length
This commit is contained in:
parent
0fa130a1ac
commit
5f39f42098
5 changed files with 5 additions and 5 deletions
|
|
@ -14,7 +14,7 @@ static inline void hydrolink_msg_ack_encode(uint8_t src_id, uint8_t dst_id, cons
|
|||
crc_xmodem_init(&crc);
|
||||
packet->id = HYDROLINK_MSG_ID_ACK;
|
||||
crc_xmodem_accumulate(packet->id, &crc);
|
||||
packet->payload_length = HYDROLINK_MSG_ACK_LEN + HYDROLINK_NON_PAYLOAD_LEN;
|
||||
packet->payload_length = HYDROLINK_MSG_ACK_LEN;
|
||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||
packet->dst_id = dst_id;
|
||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ static inline void hydrolink_msg_get_cmd_encode(uint8_t src_id, uint8_t dst_id,
|
|||
crc_xmodem_init(&crc);
|
||||
packet->id = HYDROLINK_MSG_ID_GET_CMD;
|
||||
crc_xmodem_accumulate(packet->id, &crc);
|
||||
packet->payload_length = HYDROLINK_MSG_GET_CMD_LEN + HYDROLINK_NON_PAYLOAD_LEN;
|
||||
packet->payload_length = HYDROLINK_MSG_GET_CMD_LEN;
|
||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||
packet->dst_id = dst_id;
|
||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ static inline void hydrolink_msg_get_response_encode(uint8_t src_id, uint8_t dst
|
|||
crc_xmodem_init(&crc);
|
||||
packet->id = HYDROLINK_MSG_ID_GET_RESPONSE;
|
||||
crc_xmodem_accumulate(packet->id, &crc);
|
||||
packet->payload_length = HYDROLINK_MSG_GET_RESPONSE_LEN + HYDROLINK_NON_PAYLOAD_LEN;
|
||||
packet->payload_length = HYDROLINK_MSG_GET_RESPONSE_LEN;
|
||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||
packet->dst_id = dst_id;
|
||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ static inline void hydrolink_msg_set_cmd_encode(uint8_t src_id, uint8_t dst_id,
|
|||
crc_xmodem_init(&crc);
|
||||
packet->id = HYDROLINK_MSG_ID_SET_CMD;
|
||||
crc_xmodem_accumulate(packet->id, &crc);
|
||||
packet->payload_length = HYDROLINK_MSG_SET_CMD_LEN + HYDROLINK_NON_PAYLOAD_LEN;
|
||||
packet->payload_length = HYDROLINK_MSG_SET_CMD_LEN;
|
||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||
packet->dst_id = dst_id;
|
||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ static inline void hydrolink_msg_set_response_encode(uint8_t src_id, uint8_t dst
|
|||
crc_xmodem_init(&crc);
|
||||
packet->id = HYDROLINK_MSG_ID_SET_RESPONSE;
|
||||
crc_xmodem_accumulate(packet->id, &crc);
|
||||
packet->payload_length = HYDROLINK_MSG_SET_RESPONSE_LEN + HYDROLINK_NON_PAYLOAD_LEN;
|
||||
packet->payload_length = HYDROLINK_MSG_SET_RESPONSE_LEN;
|
||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||
packet->dst_id = dst_id;
|
||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||
|
|
|
|||
Loading…
Reference in a new issue