添加异常飞控固件升级
This commit is contained in:
@@ -516,7 +516,10 @@ void resend_user_parse(void *resend_device)
|
||||
使用sync与isp确定通讯波特率,并建立联系 解除其写保护 并重新sync建立连接后擦除全部区域内存*/
|
||||
//关闭其他线程中相同串口的使用
|
||||
sertrf.stmisp_device.flag = 1;
|
||||
// 重启飞控,并使其进入isp烧录模式
|
||||
// 修改灯珠颜色
|
||||
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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user