Skip to content

Commit 3f7c39d

Browse files
committed
fixing duf update when no dfuid is passed
1 parent 12470fe commit 3f7c39d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

nanoFirmwareFlasher/Program.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
246246
// DFU related
247247
else if (
248248
o.ListDevicesInDfuMode ||
249+
o.DfuUpdate ||
249250
!string.IsNullOrEmpty(o.DfuDeviceId))
250251
{
251252
o.Platform = "stm32";

nanoFirmwareFlasher/Stm32Operations.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ internal static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync
136136
if (updateInterface == Interface.Dfu)
137137
{
138138
// DFU update
139+
dfuDeviceId = dfuDeviceId == null ? connectedStDfuDevices[0].serial : dfuDeviceId;
139140
dfuDevice = new StmDfuDevice(dfuDeviceId);
140141

141142
if (!dfuDevice.DevicePresent)

0 commit comments

Comments
 (0)