rzr / generic-sensors-lite

Naive implementation of w3c specs for IoT.js
https://purl.org/rzr/sensors
Apache License 2.0
10 stars 6 forks source link

ambientlight: Add ambient light API simulator #7

Closed MatonAnthony closed 5 years ago

MatonAnthony commented 5 years ago

Add an Ambient Light API simulator. (see #5)

Signed-off-by: Anthony Maton me@anthony-maton.me

rzr commented 5 years ago

Thx @MatonAnthony ... looks good just a remark regarding the value

maybe there is no semantic needed at the driver level...

value could just be a number to align: https://github.com/SamsungInternet/color-sensor-js/blob/master/lib/simulator.js#L20

this should be also fixed in geolocation's simulator @Vinnl

What are you opinions on it ?

rzr commented 5 years ago

Next step is to integrate it to lib/ambientlight/index.js and use it by default see: https://github.com/rzr/color-sensor-js/blob/master/lib/index.js

Feel free to refactor your file if you want to align to the actual driver...

MatonAnthony commented 5 years ago

Yes, I tested it on macos.