Skip to content

Commit a5d8ada

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 e10952c commit a5d8ada

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

main.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8841,6 +8841,11 @@ int main(int argc, char **argv) {
88418841
// again is to assume it has the same serial number.
88428842
settings.address = -1;
88438843
settings.bus = -1;
8844+
// also skip vid/pid filtering, as that will typically change in BOOTSEL mode
8845+
settings.pid = -1;
8846+
// 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
8847+
// have a standard rpi vid/pid in BOOTSEL mode
8848+
settings.vid = settings.ser.empty() ? -1 : 0; // 0 means skip vid/pid filtering entirely, -1 means filter for rpi vid/pid
88448849
continue;
88458850
}
88468851
}

0 commit comments

Comments
 (0)