Skip to content

Commit 61e3fdd

Browse files
committed
Remove vid/pid filter when using forced commands
The vid/pid will typically change when switching to BOOTSEL mode, so remove those filters and just filter on serial number if present Fixes #261
1 parent 7c55234 commit 61e3fdd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8702,6 +8702,11 @@ int main(int argc, char **argv) {
87028702
// again is to assume it has the same serial number.
87038703
settings.address = -1;
87048704
settings.bus = -1;
8705+
// also skip vid/pid filtering, as that will typically change in BOOTSEL mode
8706+
settings.pid = -1;
8707+
// still filter for rpi vid/pid if we don't have a serial number, as that is an RP2040 running a no_flash binary, so will
8708+
// have a standard rpi vid/pid in BOOTSEL mode
8709+
settings.vid = settings.ser.empty() ? -1 : 0; // 0 means skip vid/pid filtering entirely, -1 means filter for rpi vid/pid
87058710
continue;
87068711
}
87078712
}

0 commit comments

Comments
 (0)