Description
The C/Arduino library has a method called setADCIntegrationTime
which takes a uint16_t iTimeMS
and converts it into values that the APDS9660 uses, full code can be seen here https://github.com/adafruit/Adafruit_APDS9960/blob/master/Adafruit_APDS9960.cpp#L130-L149 (NB that code does not do a particularly explicit conversion from FP to (8 bit) integer).
The CircuitPython library currently just sends the raw value but the property is a bit misleading and called integration_time
. The library defaults this to 0x01 which translates to (256 - 1) * 2.78ms = 708.9ms
.
I'm not sure if this should be corrected to match the Arduino library with its more intuitive and user-friendly values? Changing this value now would disrupt existing users as there's no (clean!) way to code this with the existing property name. Is there a way to code this to happen in CP 5+ libraries only? Is that a good approach?