From 4019ac16012daadfd2e5cb19e2948bc900d23417 Mon Sep 17 00:00:00 2001 From: Peter Holczbauer Date: Sun, 29 Sep 2019 12:49:54 +0200 Subject: [PATCH] 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 209c3413d28da8ce771abdc6bcbf7ace93549ffd. --- main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.js b/main.js index d31478e..5dfb69b 100644 --- a/main.js +++ b/main.js @@ -100,6 +100,10 @@ async function launchPayload(payload) { await device.open(); logOutput(`Connected to ${device.manufacturerName} ${device.productName}`); + if (device.configuration === null) { + await device.selectConfiguration(1); + } + await device.claimInterface(0); const deviceID = await device.transferIn(1, 16);