1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-22 15:55:33 +03:00

Merge pull request #1914 from etracer65/macos_claim_interface_error_bypass

Work around false error when claiming interface to fix firmware flashing on MacOS
This commit is contained in:
Michael Keller 2020-03-14 10:34:13 +13:00 committed by GitHub
commit 98cd93e079
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -156,7 +156,10 @@ STM32DFU_protocol.prototype.claimInterface = function (interfaceNumber) {
var self = this;
chrome.usb.claimInterface(this.handle, interfaceNumber, function claimed() {
if(self.checkChromeError()) {
// Don't perform the error check on MacOS at this time as there seems to be a bug
// where it always reports the Chrome error "Error claiming interface." even though
// the interface is in fact successfully claimed.
if (self.checkChromeError() && (GUI.operating_system !== "MacOS")) {
console.log('Failed to claim USB device!');
self.cleanup();
}