-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch contains massive refactoring of the abstract operations an…
…d internal slots used in the Sensor interface specification. The refactoring goals are: Recompose abstract operations so that duplication of the algorithms steps is removed. Drop the unused abstract operations and internal slots. Also the change brings the following behavioral changes: Fixes #152. Each Sensor instance reads the sensor readings considering its individual frequency hint, sends 'onchange' and caches the sensor latest reading at this moment. The Sensor's attributes return values from the cached reading. Thus we achieve: appearance of a new Sensor instance with a higher frequency hint does not affect the behavior of the existing Sensor instances of the same type. consistency between the Sensor's 'onchange' notification and its attribute values. Fixes #168. A Sensor object returns reading values only in "activated" state and returns null otherwise. Fixes #199 Fixes #200 Fixes #201 Fixes #203
- Loading branch information
Mikhail Pozdnyakov
committed
Jun 28, 2017
1 parent
1f30b92
commit e635e0e
Showing
2 changed files
with
237 additions
and
706 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.