From 2800c2660b6f47339aea7a90da36a92a92b33ad1 Mon Sep 17 00:00:00 2001 From: OPTOC <9159397+optoc@user.noreply.gitee.com> Date: Mon, 27 Oct 2025 19:01:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=BC=82=E5=B8=B8=E9=A3=9E?= =?UTF-8?q?=E6=8E=A7=E5=9B=BA=E4=BB=B6=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/drivers/sertrf/sertrf.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/drivers/sertrf/sertrf.c b/app/drivers/sertrf/sertrf.c index 744477b..ea70142 100644 --- a/app/drivers/sertrf/sertrf.c +++ b/app/drivers/sertrf/sertrf.c @@ -516,8 +516,11 @@ void resend_user_parse(void *resend_device) 使用sync与isp确定通讯波特率,并建立联系 解除其写保护 并重新sync建立连接后擦除全部区域内存*/ //关闭其他线程中相同串口的使用 sertrf.stmisp_device.flag = 1; - // 重启飞控,并使其进入isp烧录模式 - fc_reboot(); + // 修改灯珠颜色 + protocol_set_message_status(MESSAGE_FC_ISP); + // 重启飞控,并使其进入isp烧录模式 需要在能够识别飞控的情况下才需要重启 + if(sertrf.fc_protocol_status != PROTOCOL_STATUS_TYPE_IDLE && sertrf.fc_protocol_status != PROTOCOL_STATUS_NO_DATA) + fc_reboot(); boot_set(0); os_thread_sleep(1000); //串口切换为偶校验模式,并清除缓存 @@ -525,7 +528,11 @@ void resend_user_parse(void *resend_device) os_thread_sleep(100); // 与isp确定通讯波特率,并建立联系 if(!send_sync(&sertrf.stmisp_device, 5)) + { printf("stmisp: sync error\n"); + // app_send_error_code(SERTRF_ERROR_FC_ISP_SYNC); + break; + } else printf("stmisp: sync ok\n");