solettaproject / soletta

Soletta Project is a framework for making IoT devices. With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.
http://solettaproject.org
Apache License 2.0
225 stars 108 forks source link

iio: Add new nodes for light intensity sensors #2340

Closed yongli3 closed 8 years ago

yongli3 commented 8 years ago

To support intensity_both/intensity_ir data reading in some light sensors

Signed-off-by: Yong Li yong.b.li@intel.com

yongli3 commented 8 years ago

@edersondisouza @fulong82 @laykuanloon please help to review, this PR is used for issue #2244. Test okay using tsl2563

yongli3 commented 8 years ago

@edersondisouza @fulong82 I updated the PR, please help to review/test it

edersondisouza commented 8 years ago

Integrated, tks!

yongli3 commented 8 years ago

Thanks @edersondisouza I have tested it on my boards using TSL2563, HMC5843 and L3G4200D. I will submit another PR for the strndup checking. @fulong82 please help to re-test it using your HID sensors

fulong82 commented 8 years ago

@yongli3,

Tested working. Thanks. 👍

fulong82 commented 8 years ago

@laykuanloon & @yongli3

Btw, i saw this warning message when using the latest code base. Do we need to suppress it as not all iio device will have mount_matrix especially ambient light sensor.

# ../runfbsh als.fbp sol-flow-hid.json
WRN: ./src/lib/io/sol-iio.c:770 get_mount_matrix() Could not find mount_matrix for device2
illuminance = 103.583000 (float range) Lux
illuminance = 104.473000 (float range) Lux
illuminance = 103.880000 (float range) Lux
yongli3 commented 8 years ago

@fulong82 Thanks for your quick response! Regarding this WRN message, I think we can change it to DBG, any comments/suggestions? I also found there are other "Could not get offset/scale for channel" messages too

fulong82 commented 8 years ago

@yongli3 I am fine for SOL_DBG. :-)

@laykuanloon What do you think? Since you are the requester for it.

laykuanloon commented 8 years ago

@fulong82 @yongli3 I am ok.