Select USB configuration if it is null (#59)

* remove CNAME for testing with github pages

* select configuration if it is null

* Revert "remove CNAME for testing with github pages"
This was done for testing.

This reverts commit 209c3413d2.
pull/60/head
Peter Holczbauer 2019-09-29 12:49:54 +02:00 committed by tomGER
parent a5f656c956
commit 4019ac1601
1 changed files with 4 additions and 0 deletions

View File

@ -100,6 +100,10 @@ async function launchPayload(payload) {
await device.open(); await device.open();
logOutput(`Connected to ${device.manufacturerName} ${device.productName}`); logOutput(`Connected to ${device.manufacturerName} ${device.productName}`);
if (device.configuration === null) {
await device.selectConfiguration(1);
}
await device.claimInterface(0); await device.claimInterface(0);
const deviceID = await device.transferIn(1, 16); const deviceID = await device.transferIn(1, 16);