Okay, I think I have it figured out. The pseudocode given in the documentation is not very clear (and possibly wrong). I've managed to get it working using the following pseudocode: for (i_sensor = 0; i_sensor < n_sensors; i_sensor++){ // For loop for all sensors
call_init_bsec() // Re-initiate the bsec library
call_bsec_set_configuration() // Set the configuration
call_update_subscription() // Set the subscription sampling rate
load_state_file(i_sensor) // Load state string for the particular sensor. In case that the sensor was not used before, skip this step
call_bsec_sensor_control() // Get the sensor settings to be used (This seems to be nessecary to call)
set_input(i_sensor, input) // Populate input struct using recorded data-point
call_do_steps(input) // Call do_steps
retrieve_state_file(i_sensor) // Retrieve state string for the particular sensor
}
... View more