Skip to content

Commit 22f21dd

Browse files
committed
Another attempt at fixing boardsetupwindow
1 parent 7d0abe8 commit 22f21dd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

boardsetupwindow.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -483,9 +483,14 @@ bool BoardSetupWindow::tryFirmwareUpload(){
483483
testResultMsg = "The firmware file path is non-existent.";
484484
return false;
485485
}
486-
for(int j = 15; j>-1; j--){
486+
for(int j = 25; j >= 0; j--){
487487
ui->firmwareLabel->setText("Waiting for Reboot: " + QString::number(j) + " s");
488488
Utility::sleepWithEventLoop(1000);
489+
490+
if (j < 20 && mVesc->lastPortAvailable()) {
491+
Utility::sleepWithEventLoop(1000);
492+
break;
493+
}
489494
}
490495
bool reconnected = trySerialConnect();
491496
if(reconnected){

0 commit comments

Comments
 (0)