Skip to content

Commit

Permalink
Upload bootloader first on custom-tab as well
Browse files Browse the repository at this point in the history
  • Loading branch information
vedderb committed Jul 24, 2024
1 parent 517c845 commit 85fc61f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
8 changes: 8 additions & 0 deletions pages/pagefirmware.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,14 @@ void PageFirmware::uploadFw(bool allOverCan)
tr("The selected file name seems to be invalid."));
return;
}

if (ui->fwCustomBlBox->isChecked() && mVesc->commands()->getLimitedSupportsEraseBootloader()) {
QListWidgetItem *item = ui->blList->currentItem();

if (item) {
fileBl.setFileName(item->data(Qt::UserRole).toString());
}
}
} else {
QListWidgetItem *item = ui->blList->currentItem();

Expand Down
17 changes: 13 additions & 4 deletions pages/pagefirmware.ui
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
<widget class="QLabel" name="label">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
Expand All @@ -64,7 +63,6 @@
<widget class="QLabel" name="label_2">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
Expand Down Expand Up @@ -283,6 +281,19 @@
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="fwCustomBlBox">
<property name="toolTip">
<string>Upload bootloader before uploading firmware</string>
</property>
<property name="text">
<string>Upload Bootloader</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
Expand Down Expand Up @@ -329,7 +340,6 @@
<widget class="QLabel" name="label_3">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
Expand All @@ -352,7 +362,6 @@
<widget class="QLabel" name="label_4">
<property name="font">
<font>
<weight>75</weight>
<bold>true</bold>
</font>
</property>
Expand Down

0 comments on commit 85fc61f

Please sign in to comment.