diff --git a/include/hydrolink/hydrolink_msg_ack.h b/include/hydrolink/hydrolink_msg_ack.h index fe29a33..bc9d483 100644 --- a/include/hydrolink/hydrolink_msg_ack.h +++ b/include/hydrolink/hydrolink_msg_ack.h @@ -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); diff --git a/include/hydrolink/hydrolink_msg_get_cmd.h b/include/hydrolink/hydrolink_msg_get_cmd.h index 0fbfb1e..f888fc9 100644 --- a/include/hydrolink/hydrolink_msg_get_cmd.h +++ b/include/hydrolink/hydrolink_msg_get_cmd.h @@ -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); diff --git a/include/hydrolink/hydrolink_msg_get_response.h b/include/hydrolink/hydrolink_msg_get_response.h index 8e90a1c..8520e86 100644 --- a/include/hydrolink/hydrolink_msg_get_response.h +++ b/include/hydrolink/hydrolink_msg_get_response.h @@ -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); diff --git a/include/hydrolink/hydrolink_msg_set_cmd.h b/include/hydrolink/hydrolink_msg_set_cmd.h index 9b81280..5fe74e3 100644 --- a/include/hydrolink/hydrolink_msg_set_cmd.h +++ b/include/hydrolink/hydrolink_msg_set_cmd.h @@ -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); diff --git a/include/hydrolink/hydrolink_msg_set_response.h b/include/hydrolink/hydrolink_msg_set_response.h index 5dd22f5..3015f21 100644 --- a/include/hydrolink/hydrolink_msg_set_response.h +++ b/include/hydrolink/hydrolink_msg_set_response.h @@ -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);