fixed typo

This commit is contained in:
Thies Lennart Alff 2025-02-25 13:38:13 +01:00
parent 0113eb9911
commit 78f135043c
Signed by: lennartalff
GPG key ID: 4EC67D34D594104D
5 changed files with 10 additions and 10 deletions

View file

@ -13,7 +13,7 @@ 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;
packet->payload_length = HYDROLINK_MSG_1_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); crc_xmodem_accumulate(packet->id, &crc);
packet->dst_id = dst_id; packet->dst_id = dst_id;
@ -24,7 +24,7 @@ static inline void hydrolink_msg_ack_encode(uint8_t src_id, uint8_t dst_id, cons
for(int i = 0; i < packet->payload_length; ++i) { for(int i = 0; i < packet->payload_length; ++i) {
crc_xmodem_accumulate(packet->payload[i], &crc); crc_xmodem_accumulate(packet->payload[i], &crc);
} }
crc_xmodem_acumulate(HYDROLINK_MSG_ACK_CRC_EXTRA, &crc); crc_xmodem_accumulate(HYDROLINK_MSG_ACK_CRC_EXTRA, &crc);
packet->crc = crc; packet->crc = crc;
} }

View file

@ -14,7 +14,7 @@ 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;
packet->payload_length = HYDROLINK_MSG_4_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); crc_xmodem_accumulate(packet->id, &crc);
packet->dst_id = dst_id; packet->dst_id = dst_id;
@ -26,7 +26,7 @@ static inline void hydrolink_msg_get_cmd_encode(uint8_t src_id, uint8_t dst_id,
for(int i = 0; i < packet->payload_length; ++i) { for(int i = 0; i < packet->payload_length; ++i) {
crc_xmodem_accumulate(packet->payload[i], &crc); crc_xmodem_accumulate(packet->payload[i], &crc);
} }
crc_xmodem_acumulate(HYDROLINK_MSG_GET_CMD_CRC_EXTRA, &crc); crc_xmodem_accumulate(HYDROLINK_MSG_GET_CMD_CRC_EXTRA, &crc);
packet->crc = crc; packet->crc = crc;
} }

View file

@ -15,7 +15,7 @@ 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;
packet->payload_length = HYDROLINK_MSG_5_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); crc_xmodem_accumulate(packet->id, &crc);
packet->dst_id = dst_id; packet->dst_id = dst_id;
@ -28,7 +28,7 @@ static inline void hydrolink_msg_get_response_encode(uint8_t src_id, uint8_t dst
for(int i = 0; i < packet->payload_length; ++i) { for(int i = 0; i < packet->payload_length; ++i) {
crc_xmodem_accumulate(packet->payload[i], &crc); crc_xmodem_accumulate(packet->payload[i], &crc);
} }
crc_xmodem_acumulate(HYDROLINK_MSG_GET_RESPONSE_CRC_EXTRA, &crc); crc_xmodem_accumulate(HYDROLINK_MSG_GET_RESPONSE_CRC_EXTRA, &crc);
packet->crc = crc; packet->crc = crc;
} }

View file

@ -15,7 +15,7 @@ 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;
packet->payload_length = HYDROLINK_MSG_2_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); crc_xmodem_accumulate(packet->id, &crc);
packet->dst_id = dst_id; packet->dst_id = dst_id;
@ -28,7 +28,7 @@ static inline void hydrolink_msg_set_cmd_encode(uint8_t src_id, uint8_t dst_id,
for(int i = 0; i < packet->payload_length; ++i) { for(int i = 0; i < packet->payload_length; ++i) {
crc_xmodem_accumulate(packet->payload[i], &crc); crc_xmodem_accumulate(packet->payload[i], &crc);
} }
crc_xmodem_acumulate(HYDROLINK_MSG_SET_CMD_CRC_EXTRA, &crc); crc_xmodem_accumulate(HYDROLINK_MSG_SET_CMD_CRC_EXTRA, &crc);
packet->crc = crc; packet->crc = crc;
} }

View file

@ -14,7 +14,7 @@ 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;
packet->payload_length = HYDROLINK_MSG_3_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); crc_xmodem_accumulate(packet->id, &crc);
packet->dst_id = dst_id; packet->dst_id = dst_id;
@ -26,7 +26,7 @@ static inline void hydrolink_msg_set_response_encode(uint8_t src_id, uint8_t dst
for(int i = 0; i < packet->payload_length; ++i) { for(int i = 0; i < packet->payload_length; ++i) {
crc_xmodem_accumulate(packet->payload[i], &crc); crc_xmodem_accumulate(packet->payload[i], &crc);
} }
crc_xmodem_acumulate(HYDROLINK_MSG_SET_RESPONSE_CRC_EXTRA, &crc); crc_xmodem_accumulate(HYDROLINK_MSG_SET_RESPONSE_CRC_EXTRA, &crc);
packet->crc = crc; packet->crc = crc;
} }