Skip to content

Commit

Permalink
Fixing DFU detection for PyBStick and DFU Driver installation (#208)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ellerbach authored Apr 17, 2023
1 parent 129bad4 commit 4ca230f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions nanoFirmwareFlasher.Tool/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,7 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
{
// easiest one: ESP32
if (o.TargetName.StartsWith("ESP")
|| o.TargetName.StartsWith("M5")
|| o.TargetName.StartsWith("Pyb")
|| o.TargetName.StartsWith("M5")
|| o.TargetName.StartsWith("FEATHER")
|| o.TargetName.StartsWith("ESPKALUGA"))
{
Expand All @@ -464,6 +463,7 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
|| o.TargetName.StartsWith("IngenuityMicro")
|| o.TargetName.StartsWith("WeAct")
|| o.TargetName.StartsWith("ORGPAL")
|| o.TargetName.StartsWith("Pyb")
)
{
// candidates for STM32
Expand Down Expand Up @@ -509,17 +509,7 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
!string.IsNullOrEmpty(o.DfuDeviceId))
{
o.Platform = SupportedPlatform.stm32;
}
// ESP32 related
else if (
!string.IsNullOrEmpty(o.SerialPort) ||
(o.BaudRate != 921600) ||
(o.Esp32FlashMode != "dio") ||
(o.Esp32FlashFrequency != 40) ||
!string.IsNullOrEmpty(o.Esp32ClrFile))
{
o.Platform = SupportedPlatform.esp32;
}
}
// GG11 related
else if (o.ListJLinkDevices)
{
Expand All @@ -536,6 +526,16 @@ static async Task RunOptionsAndReturnExitCodeAsync(Options o)
{
o.Platform = SupportedPlatform.stm32;
}
// ESP32 related
else if (
!string.IsNullOrEmpty(o.SerialPort) ||
(o.BaudRate != 921600) ||
(o.Esp32FlashMode != "dio") ||
(o.Esp32FlashFrequency != 40) ||
!string.IsNullOrEmpty(o.Esp32ClrFile))
{
o.Platform = SupportedPlatform.esp32;
}
}

#endregion
Expand Down

0 comments on commit 4ca230f

Please sign in to comment.