Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.vscode/launch.json
#	application/gimbal/gimbal.c
#	application/robot.c
#	bsp/usart/bsp_usart.c
#	bsp/usart/bsp_usart.h
#	modules/master_machine/master_process.c
#	modules/master_machine/seasky_protocol.c
This commit is contained in:
chenfu
2023-03-22 16:49:56 +08:00
44 changed files with 1877 additions and 602 deletions

View File

@@ -56,7 +56,7 @@ static uint8_t protocol_heade_Check(protocol_rm_struct *pro, uint8_t *rx_buf)
pro->header.sof = rx_buf[0];
if (CRC8_Check_Sum(&rx_buf[0], 4))
{
pro->header.data_length = ((rx_buf[2] << 8) | rx_buf[1]);
pro->header.data_length = (rx_buf[2] << 8) | rx_buf[1];
pro->header.crc_check = rx_buf[3];
pro->cmd_id = (rx_buf[5] << 8) | rx_buf[4];
return 1;
@@ -125,9 +125,9 @@ uint16_t get_protocol_info(uint8_t *rx_buf, // 接收到的原始数据
if (CRC16_Check_Sum(&rx_buf[0], date_length))
{
*flags_register = (rx_buf[7] << 8) | rx_buf[6];
memcpy(rx_data, rx_buf + 8, (pro.header.data_length - 2));
memcpy(rx_data, rx_buf + 8, pro.header.data_length - 2);
return pro.cmd_id;
}
}
}
return 0;
}