Skip to content

Commit 08b68b9

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 900ba88 commit 08b68b9

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
@@ -8762,6 +8762,11 @@ int main(int argc, char **argv) {
87628762
// again is to assume it has the same serial number.
87638763
settings.address = -1;
87648764
settings.bus = -1;
8765+
// also skip vid/pid filtering, as that will typically change in BOOTSEL mode
8766+
settings.pid = -1;
8767+
// 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
8768+
// have a standard rpi vid/pid in BOOTSEL mode
8769+
settings.vid = settings.ser.empty() ? -1 : 0; // 0 means skip vid/pid filtering entirely, -1 means filter for rpi vid/pid
87658770
continue;
87668771
}
87678772
}

0 commit comments

Comments
 (0)