bugfix: fix wrong offset for checksum

This commit is contained in:
charles
2023-05-25 11:29:34 +08:00
parent 8ed0921284
commit 386bc17007
+1 -1
View File
@@ -196,7 +196,7 @@ static void regular_data_msg_task(void *pArg)
chksum += payload.raw[i];
}
/* append checksum */
payload.raw[payload.header.len + 1] = chksum;
payload.raw[payload.header.len] = chksum;
/* try to send notify */
ret_code_t err_code = le_regular_data_notify(payload.raw, payload.header.len + 1);
/* if notify success, breaks out of the loop. */