Skip to content

Commit

Permalink
fixing duf update when no dfuid is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellerbach committed Nov 26, 2021
1 parent 12470fe commit 3f7c39d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions nanoFirmwareFlasher/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
// DFU related
else if (
o.ListDevicesInDfuMode ||
o.DfuUpdate ||
!string.IsNullOrEmpty(o.DfuDeviceId))
{
o.Platform = "stm32";
Expand Down
1 change: 1 addition & 0 deletions nanoFirmwareFlasher/Stm32Operations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ internal static async System.Threading.Tasks.Task<ExitCodes> UpdateFirmwareAsync
if (updateInterface == Interface.Dfu)
{
// DFU update
dfuDeviceId = dfuDeviceId == null ? connectedStDfuDevices[0].serial : dfuDeviceId;
dfuDevice = new StmDfuDevice(dfuDeviceId);

if (!dfuDevice.DevicePresent)
Expand Down

0 comments on commit 3f7c39d

Please sign in to comment.