- From: Mikhail Pozdnyakov via GitHub <sysbot+gh@w3.org>
- Date: Mon, 27 Feb 2017 11:37:20 +0000
- To: public-device-apis-log@w3.org
The previous proposal looks a bit clumsy and not sufficient for some use cases (https://github.com/w3c/sensors/issues/171#issuecomment-282032472) , so another approach: ``` interface MotionSensor : Sensor { /** * Populates the passed array with the sensor readings. * * The returned promise is resolved when the buffer gets full or when sensor stops. * * The returned promise is rejected if sensor wasn't yet started or if an error has * occurred. */ Promise<> populateBuffer(Float64Array array); } ``` For implementing this we could start a new thread collecting readings in background until the required amount of data is collected. @tobie, PTAL -- GitHub Notification of comment by pozdnyakov Please view or discuss this issue at https://github.com/w3c/sensors/issues/171#issuecomment-282697255 using your GitHub account
Received on Monday, 27 February 2017 11:37:27 UTC