fixed another wrong order
This commit is contained in:
parent
78f135043c
commit
0fa130a1ac
5 changed files with 5 additions and 5 deletions
|
|
@ -13,9 +13,9 @@ static inline void hydrolink_msg_ack_encode(uint8_t src_id, uint8_t dst_id, cons
|
||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
crc_xmodem_init(&crc);
|
crc_xmodem_init(&crc);
|
||||||
packet->id = HYDROLINK_MSG_ID_ACK;
|
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 + HYDROLINK_NON_PAYLOAD_LEN;
|
||||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||||
crc_xmodem_accumulate(packet->id, &crc);
|
|
||||||
packet->dst_id = dst_id;
|
packet->dst_id = dst_id;
|
||||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||||
packet->src_id = src_id;
|
packet->src_id = src_id;
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ static inline void hydrolink_msg_get_cmd_encode(uint8_t src_id, uint8_t dst_id,
|
||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
crc_xmodem_init(&crc);
|
crc_xmodem_init(&crc);
|
||||||
packet->id = HYDROLINK_MSG_ID_GET_CMD;
|
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 + HYDROLINK_NON_PAYLOAD_LEN;
|
||||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||||
crc_xmodem_accumulate(packet->id, &crc);
|
|
||||||
packet->dst_id = dst_id;
|
packet->dst_id = dst_id;
|
||||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||||
packet->src_id = src_id;
|
packet->src_id = src_id;
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ static inline void hydrolink_msg_get_response_encode(uint8_t src_id, uint8_t dst
|
||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
crc_xmodem_init(&crc);
|
crc_xmodem_init(&crc);
|
||||||
packet->id = HYDROLINK_MSG_ID_GET_RESPONSE;
|
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 + HYDROLINK_NON_PAYLOAD_LEN;
|
||||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||||
crc_xmodem_accumulate(packet->id, &crc);
|
|
||||||
packet->dst_id = dst_id;
|
packet->dst_id = dst_id;
|
||||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||||
packet->src_id = src_id;
|
packet->src_id = src_id;
|
||||||
|
|
|
||||||
|
|
@ -15,9 +15,9 @@ static inline void hydrolink_msg_set_cmd_encode(uint8_t src_id, uint8_t dst_id,
|
||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
crc_xmodem_init(&crc);
|
crc_xmodem_init(&crc);
|
||||||
packet->id = HYDROLINK_MSG_ID_SET_CMD;
|
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 + HYDROLINK_NON_PAYLOAD_LEN;
|
||||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||||
crc_xmodem_accumulate(packet->id, &crc);
|
|
||||||
packet->dst_id = dst_id;
|
packet->dst_id = dst_id;
|
||||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||||
packet->src_id = src_id;
|
packet->src_id = src_id;
|
||||||
|
|
|
||||||
|
|
@ -14,9 +14,9 @@ static inline void hydrolink_msg_set_response_encode(uint8_t src_id, uint8_t dst
|
||||||
uint16_t crc;
|
uint16_t crc;
|
||||||
crc_xmodem_init(&crc);
|
crc_xmodem_init(&crc);
|
||||||
packet->id = HYDROLINK_MSG_ID_SET_RESPONSE;
|
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 + HYDROLINK_NON_PAYLOAD_LEN;
|
||||||
crc_xmodem_accumulate(packet->payload_length, &crc);
|
crc_xmodem_accumulate(packet->payload_length, &crc);
|
||||||
crc_xmodem_accumulate(packet->id, &crc);
|
|
||||||
packet->dst_id = dst_id;
|
packet->dst_id = dst_id;
|
||||||
crc_xmodem_accumulate(packet->dst_id, &crc);
|
crc_xmodem_accumulate(packet->dst_id, &crc);
|
||||||
packet->src_id = src_id;
|
packet->src_id = src_id;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue