 );
}

function gotUSBDevice(result)
{
	if( result.length < 1 )
	{
		setStatusError( "Error: No devices found" );
		return;
	}

	if( result[0].productName != expectedProductName0 && result[0].productName != expectedProductName1 )
	{
		setStatusError( "Error: Wrong device name.  Got " + result[0].productName + " Expected '" + expectedProductName0 + "' or '" + expectedProductName1 + "'."  );
		return;
	}

	const thisDev = result[0];
	
	tryOpen( thisDev );
}

function tryOpen( thisDev )
{
	thisDev.open().then(