Merge branch 'master' of https://git.brisky.space/hexone2086/lora_plug
This commit is contained in:
@@ -245,6 +245,8 @@ static PyObject *serial_send(PyObject *self, PyObject *args)
|
||||
// 拷贝该帧对应数据段
|
||||
memcpy(send_buffer + HEADER_SIZE, data + offset, data_len);
|
||||
|
||||
printf("Received frame: seq=%d, len=%d\r\n", frame_counter, data_len);
|
||||
|
||||
// 计算 CRC32 校验和
|
||||
uint32_t crc = calculate_crc32(send_buffer, HEADER_SIZE + DATA_SIZE + FEC_SIZE);
|
||||
memcpy(send_buffer + HEADER_SIZE + DATA_SIZE + FEC_SIZE, &crc, CHECKSUM_SIZE);
|
||||
|
||||
Reference in New Issue
Block a user