Skip to main content
v++
Associate II
March 7, 2023
Question

Histogram generation loop - VL53L3CX

  • March 7, 2023
  • 2 replies
  • 1472 views

Hello Community,

I do agree we don't need to write the code as API is well updated, but to understand my output properly I could really use your help on understanding bits of the histogram loop.

  1. if ((pMultiRangingData->StreamCount & 1) == 1) ---> what does StreamCount refer to ?
    1. How does this loop handle ambient light ?
    2. why does the signals always start from bin index 4 ? Can this be changed ?

If you could point me to docs on it I am happy to read further

Thank you

V++

This topic has been closed for replies.

2 replies

Zhiyuan.Han
Technical Moderator
April 26, 2023

Hi V++

StreamCount is a 8-bit integer gives a counter incremented at each range. The value starts at 0,

incrementing 1 by 1 up to 255. When it reaches 255, it starts again from 128 to 255. you can print it out to easy your understanding.

AMB is similar handled with return signal rate, the difference is AMB IS collected during VCSEL stop emitting.

F​or the signal bin topic, the purpose is to leave buffer for short distance. this is fixed, not able to change.

At last, seems your shred 1 line code was modified, I can't find it in office release package.

br

Zhiyuan.Han

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
v++
v++Author
Associate II
May 4, 2023

Hi Thanks for your attention on this. Was starting to think it was stalled but finally had your response.

first you’re right the snippet didn’t come with the office release package. However it was put together from related posts on this community which I gathered. Also after further looking into the code and reading accompanying documentation I found that the stream count is only needed when ranging in interrupt mode.

what I currently need help with, and if you have the answer of course is, I realised the histogram bins with returned signals are spread across 3bins out of the 20bin from the zone. Can you confirm if this variable is modifiable from the release package? If yes please share the method/api for this if I can modify from the package.

if not, please give me some explanation as to why. this

thanks for taking a look at this post.

v++

v++
v++Author
Associate II
May 4, 2023

Some clarity to this is can I possibly choose to generate histograms of bin width 20mm instead of 20cm for instance?

Zhiyuan.Han
Technical Moderator
May 4, 2023

Hi V++

For the histogram bin width, it is a fix valued defined by device HW, it's not configurable.

Br

Zhiyuan.Han

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.