You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/07/02 16:22:30 UTC

[GitHub] microbuilder opened a new pull request #1237: [WIP] Initial TSL2591 driver

microbuilder opened a new pull request #1237: [WIP] Initial TSL2591 driver
URL: https://github.com/apache/mynewt-core/pull/1237
 
 
   This is an initial attempt at a driver for the [TSL2591 light sensor](https://www.adafruit.com/product/1980) since the currently supported TSL2561 is EOL.
   
   This driver includes basic shell config support, and read operations, but does not currently include interrupt support for threshold triggering. This can be added in a future PR once the concerns below are addressed.
   
   Before this can be merged, it would be beneficial to discuss the timing constraints around this sensor (and others like the TSL2561). It has a variable integration time from 100..600ms, and any reads before this initial delay or less than this between conversions will results in faulty or stale data being returned.
   
   An experimental flag called `TSL2591_ITIME_DELAY` has been added to the package syscfg.yml file, but this is really just an attempt to get a discussion started on how to handle situations where the sensor may be polled at a rate inconsistent with the HW limitations, and how to best handle these timing disparities.
   
   This timing delay can be dynamic in certain situations, such as implementing auto-ranging support in the driver to accommodate a wide range of lighting conditions. As the light level lowers, you would increase the integration time and thus the overall sensitivity, and vice versa in high light situations. These changes may be transparent to the user at the application level, meaning they need some way to determine the minimum delay between **valid** sensor reads, which isn't part of the current sensor API design but should perhaps be considered as an addition via a new field required by all sensor drivers (`.min_delay`, etc.)?
   
   Any thoughts (and testing) is welcome!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services