You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • Ahh - that's right! Thank you!

    Sorry, I'd been thinking about setServices for some reason (hence the EVT_HVX).

    Annoyingly it's the Web Bluetooth spec so I can't just change the way it works (eg for the event to have a data field for current data).

    But actually the fix should be quite easy. Just changing jsiQueueObjectCallbacks to jsiExecuteObjectCallbacks - as you say it'll just defer the processing until after.

    If that causes issues we could queue a function call that looks a bit like:

    function handleData(characteristic, data) {
      characteristic.value = data;
      characteristic.emit('characteristicvalue­changed',{target:characteristic});
    }
    
About

Avatar for Gordon @Gordon started