Open smartyw opened 5 years ago
FYI I'm going to submit a PR for this. The goal will be to expose a new config.json property which allows selection of the three possible permutations of WRITE types for the CLIENT_EVENT characteristic, like this:
"client_event_write_types" : "FAST_ONLY",
"client_event_write_types" : "RELIABLE_ONLY",
"client_event_write_types" : "BOTH_FAST_AND_RELIABLE",
// default will be "BOTH_FAST_AND_RELIABLE"
FAST means WRITE_WITHOUT_RESPONSE
RELIABLE means WRITE request
BOTH means both and will be the default as that is the current situation.
An issue with Web Bluetooth makes it difficult to work with characteristics that support both WRITE and WRITE WITHOUT RESPONSE.
Please make it possible to configure which of these operations the Client Event characteristic supports in a way which makes it possible to expose this capability in MakeCode.
See https://github.com/Microsoft/pxt-microbit/issues/1742