07-02-2023 10:40 PM
I'm having hard time understanding why does BSEC API documentation show a sequence diagram that differs from the sequence of code execution provided by the BSEC example (from the folder in BSEC 2.4.0. download file). This is the sequence diagram from BSEC documentation:
As shown on the picture, the pseudo code could be written as the following code:
if (current_time_ns >= sensor_settings.next_call)
{)
if (sensor_settings.op_mode != current_op_mode)
{}
if (sensor_settings.trigger_measurement == 1)
{}
if (sensor_settings.process_data != 0)
{}
However, in BSEC example, the process flow is like this:
if (current_time_ns >= sensor_settings.next_call)
{
if (sensor_settings.op_mode != current_op_mode)
{}
if (sensor_settings.trigger_measurement == 1)
{}
if (sensor_settings.process_data != 0)
{}
)
I guess the code from BSEC example implies the proper operation, however its not clear whether the BSEC API documentation means the same thing?
07-03-2023 11:22 AM
Hi lgacnik97,
The sequence diagram on the integration document is only a reference and can only demonstrate the general software framework, rather than listing all the software details. Please refer to actual software examples for practical purposes.