APDS-9960_RGB_and_Gesture_Sensor icon indicating copy to clipboard operation
APDS-9960_RGB_and_Gesture_Sensor copied to clipboard

Why U,D,L,R registers sometimes give out of range values like 255?

Open hjjayakrishnan opened this issue 7 years ago • 1 comments

I've set GFIFOTH to trigger an interrupt when the fifolevel is greater than 8 datasets. In the interrupt handler I read the U,L,D,R registers until GFLVL is zero within a while loop and stored the values into an array, so that I can compare the initial and final values to decode my gesture. But I have been getting values such as 255 in the registers. Following are the values I obtained while debugging, the first time it went to the interrupt handler when I waved my hand from left to right.

U int[100] [19, 35, 65, 125, 216, 255, 255, 255, 255, 255, 255, 255, 255, 244, 34, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] D int[100] [20, 38, 70, 122, 197, 255, 255, 255, 255, 255, 255, 255, 255, 168, 27, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] L int[100] [7, 9, 19, 34, 70, 138, 255, 255, 255, 255, 255, 255, 255, 255, 39, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...] R int[100] [39, 63, 117, 200, 255, 255, 255, 255, 255, 255, 255, 255, 255, 53, 7, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...]

With values such as this I'm totally out of range and I can't properly decode the gestures. Any ideas why this is happening?

hjjayakrishnan avatar Nov 24 '16 20:11 hjjayakrishnan