Skip to content

Commit

Permalink
tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
doegox committed Dec 12, 2021
1 parent 0673dd2 commit d61d624
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pm3
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ function get_pm3_list_Windows {
N=$1
PM3LIST=()

# Normal SERIAL PORTS (COM)
# Normal SERIAL PORTS (COM)
for DEV in $(wmic /locale:ms_409 path Win32_SerialPort Where "PNPDeviceID LIKE '%VID_9AC4&PID_4B8F%' Or PNPDeviceID LIKE '%VID_2D2D&PID_504D%'" Get DeviceID 2>/dev/null | awk -b '/^COM/{print $1}'); do
DEV=${DEV/ */}
#prevent soft bricking when using pm3-flash-all on an outdated bootloader
Expand Down Expand Up @@ -179,7 +179,7 @@ function get_pm3_list_WSL {
N=$1
PM3LIST=()

# Normal SERIAL PORTS (COM)
# Normal SERIAL PORTS (COM)
for DEV in $($PSHEXE -command "Get-CimInstance -ClassName Win32_serialport | Where-Object {\$_.PNPDeviceID -like '*VID_9AC4&PID_4B8F*' -or \$_.PNPDeviceID -like '*VID_2D2D&PID_504D*'} | Select -expandproperty DeviceID" 2>/dev/null | tr -dc '[:print:]'); do
_comport=$DEV
DEV=$(echo $DEV | sed -nr 's#^COM([0-9]+)\b#/dev/ttyS\1#p')
Expand Down

0 comments on commit d61d624

Please sign in to comment.