On BLE write, respect that the withResponse parameter is false regardless of "write without response" capability flag on the characteristic
Reason for Changes
In some cases, write with response causes a critical performance issue.
Here is a comparison table of average elapsed time on my development PC with a bluetooth adapter.
BLE peripheral
write with response
write without response
micro:bit
161.9 ms
1.9 ms
LEGO BOOST
123.4 ms
3.6 ms
So, I am proposing this PR so that an extension forces to write without response to resolve the critical performance issue. As @cwillisf mentioned, any outcome should be the extension's response.
Please note that specifying with response has been already supported in #71.
Resolves
Resolves #150
Proposed Changes
withResponse
parameter isfalse
regardless of "write without response" capability flag on the characteristicReason for Changes
In some cases, write with response causes a critical performance issue. Here is a comparison table of average elapsed time on my development PC with a bluetooth adapter.
So, I am proposing this PR so that an extension forces to write without response to resolve the critical performance issue. As @cwillisf mentioned, any outcome should be the extension's response.
Please note that specifying with response has been already supported in #71.
This PR should be merged with https://github.com/LLK/scratch-vm/pull/2298.