From 0fa130a1ac13948b8e96ed80c1cb6af43ede8214 Mon Sep 17 00:00:00 2001 From: Thies Lennart Alff Date: Tue, 25 Feb 2025 13:41:16 +0100 Subject: [PATCH] fixed another wrong order --- include/hydrolink/hydrolink_msg_ack.h | 2 +- include/hydrolink/hydrolink_msg_get_cmd.h | 2 +- include/hydrolink/hydrolink_msg_get_response.h | 2 +- include/hydrolink/hydrolink_msg_set_cmd.h | 2 +- include/hydrolink/hydrolink_msg_set_response.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/hydrolink/hydrolink_msg_ack.h b/include/hydrolink/hydrolink_msg_ack.h index 88e7ad1..fe29a33 100644 --- a/include/hydrolink/hydrolink_msg_ack.h +++ b/include/hydrolink/hydrolink_msg_ack.h @@ -13,9 +13,9 @@ static inline void hydrolink_msg_ack_encode(uint8_t src_id, uint8_t dst_id, cons uint16_t crc; 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; crc_xmodem_accumulate(packet->payload_length, &crc); - crc_xmodem_accumulate(packet->id, &crc); packet->dst_id = dst_id; crc_xmodem_accumulate(packet->dst_id, &crc); packet->src_id = src_id; diff --git a/include/hydrolink/hydrolink_msg_get_cmd.h b/include/hydrolink/hydrolink_msg_get_cmd.h index c0937c4..0fbfb1e 100644 --- a/include/hydrolink/hydrolink_msg_get_cmd.h +++ b/include/hydrolink/hydrolink_msg_get_cmd.h @@ -14,9 +14,9 @@ static inline void hydrolink_msg_get_cmd_encode(uint8_t src_id, uint8_t dst_id, uint16_t crc; 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; crc_xmodem_accumulate(packet->payload_length, &crc); - crc_xmodem_accumulate(packet->id, &crc); packet->dst_id = dst_id; crc_xmodem_accumulate(packet->dst_id, &crc); packet->src_id = src_id; diff --git a/include/hydrolink/hydrolink_msg_get_response.h b/include/hydrolink/hydrolink_msg_get_response.h index 7dfa4df..8e90a1c 100644 --- a/include/hydrolink/hydrolink_msg_get_response.h +++ b/include/hydrolink/hydrolink_msg_get_response.h @@ -15,9 +15,9 @@ static inline void hydrolink_msg_get_response_encode(uint8_t src_id, uint8_t dst uint16_t crc; 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; crc_xmodem_accumulate(packet->payload_length, &crc); - crc_xmodem_accumulate(packet->id, &crc); packet->dst_id = dst_id; crc_xmodem_accumulate(packet->dst_id, &crc); packet->src_id = src_id; diff --git a/include/hydrolink/hydrolink_msg_set_cmd.h b/include/hydrolink/hydrolink_msg_set_cmd.h index 1298f7c..9b81280 100644 --- a/include/hydrolink/hydrolink_msg_set_cmd.h +++ b/include/hydrolink/hydrolink_msg_set_cmd.h @@ -15,9 +15,9 @@ static inline void hydrolink_msg_set_cmd_encode(uint8_t src_id, uint8_t dst_id, uint16_t crc; 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; crc_xmodem_accumulate(packet->payload_length, &crc); - crc_xmodem_accumulate(packet->id, &crc); packet->dst_id = dst_id; crc_xmodem_accumulate(packet->dst_id, &crc); packet->src_id = src_id; diff --git a/include/hydrolink/hydrolink_msg_set_response.h b/include/hydrolink/hydrolink_msg_set_response.h index fb36594..5dd22f5 100644 --- a/include/hydrolink/hydrolink_msg_set_response.h +++ b/include/hydrolink/hydrolink_msg_set_response.h @@ -14,9 +14,9 @@ static inline void hydrolink_msg_set_response_encode(uint8_t src_id, uint8_t dst uint16_t crc; 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; crc_xmodem_accumulate(packet->payload_length, &crc); - crc_xmodem_accumulate(packet->id, &crc); packet->dst_id = dst_id; crc_xmodem_accumulate(packet->dst_id, &crc); packet->src_id = src_id;