-
so if anything it should be marginally faster.
the total time may be faster but with setScan you get the packet data sooner? As I understand it the
requestDevice
sets up a callback to collect data, starts it, collects data, stops it and resolve promise and call your code. setScan first calls your code with the data as the packet arrives and then you do the rest. And with setScan you can get more packets in one scan to do some average on the timestamps and stop when you are happy with the result.Of course it doesn't matter with precision to seconds but @malaire tried to do more
@fanoush
requestDevice
works with the exact same filter. It's basically doing exactly what you do with setScan, but inside Espruino - so if anything it should be marginally faster.