更改按键,已经添加msp重启
This commit is contained in:
@@ -522,9 +522,9 @@ void resend_user_parse(void *resend_device)
|
||||
// 修改灯珠颜色
|
||||
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);
|
||||
// if(sertrf.fc_protocol_status != PROTOCOL_STATUS_TYPE_IDLE && sertrf.fc_protocol_status != PROTOCOL_STATUS_NO_DATA)
|
||||
fc_reboot();
|
||||
boot_set_2(0);
|
||||
os_thread_sleep(1000);
|
||||
//串口切换为偶校验模式,并清除缓存
|
||||
uart_set_parity_switch(sertrf.device.embedded_device, 0x02);
|
||||
@@ -556,7 +556,7 @@ void resend_user_parse(void *resend_device)
|
||||
printf("stmisp: sync ok\n");
|
||||
os_thread_sleep(100);
|
||||
|
||||
boot_set_high_z();
|
||||
boot_set_high_z_2();
|
||||
// 全盘擦除
|
||||
if(!cmd_extended_erase_mass(&sertrf.stmisp_device))
|
||||
printf("stmisp: erase mass error\n");
|
||||
@@ -604,6 +604,7 @@ void resend_user_parse(void *resend_device)
|
||||
uart_set_parity_switch(sertrf.device.embedded_device, 0x00);
|
||||
SYS_LOG_INF("RESEND_CMD_FC_ISP_END2");
|
||||
resend_send_cmd(resend_device, RESEND_CMD_ACK, 0);
|
||||
esp_restart();
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user