解决OTA升级的过程中出现的uart栈溢出以及OTA指示灯异常

This commit is contained in:
OPTOC
2025-10-20 12:16:10 +08:00
parent 1e15f28f72
commit a8a5bb61af
2 changed files with 11 additions and 4 deletions

View File

@@ -145,15 +145,17 @@ protocol_status_t get_protocol_status(void)
{
protocol.protocol_status = PROTOCOL_STATUS_OK;
if(protocol.pro_type == PROTOCOL_IDLE)
// 先OTA升级、未知协议、未收到飞控数据
if(protocol.message_status == MESSAGE_OTA)
{
protocol.protocol_status = PROTOCOL_STATUS_IN_OTA;
}
else if(protocol.pro_type == PROTOCOL_IDLE)
{
protocol.protocol_status = PROTOCOL_STATUS_TYPE_IDLE;
} else if(protocol.analysis_sussess_count == 0)
{
protocol.protocol_status = PROTOCOL_STATUS_NO_DATA;
} else if(protocol.message_status == MESSAGE_OTA)
{
protocol.protocol_status = PROTOCOL_STATUS_IN_OTA;
}
protocol.analysis_sussess_count = 0;