我使用以下方法读取描述符的值,但是遇到了奇怪的问题
readDescriptorValue(descriptor: BLEDescriptor, callback: AsyncCallback<BLEDescriptor>): void
当我在很短时间内分别调用两个特征值的readDescriptorValue方法时,第二个readDescriptorValue的callback一直不会触发
而当我手动设置调用间隔,比如100ms时,则两个特征值的readDescriptorValue都会触发callback
如果调用了readDescriptorValue接口后,在调用readDescriptorValue接口流程还未走完之前再次调用该接口,就会导致第二次调用该接口失败,其回调自然无法触发。
若是想要在代码中连续调用该接口,建议设置一下调用间隔。