Skip to content

[SensorFIFO] Make the API thread-safe

Giovanni Annaloro requested to merge thread-safe-Fifo-Sensor into main

Class SensorFIFO has been modified to make his methods thread safe. getFifoElement and getLastFifoSize have been removed. getLastFifo has been modified, now it returns a copy of the fifo array and takes an output parameter as reference to an unsigned int in order to output the size of the last read fifo. The bmx160, lsm6dsrx and l3dg20 drivers have been made thread safe by using a lock during lastFifo array population. bmx160-with-correction driver now doesn't use getLastFifoSize anymore. All drivers test/calibration entrypoints, sensormanager and hil sensor have been modified accordingly to the new SensorFIFO implementation. A new copy constructor has been introduces in SensorFIFO class in order to be compatible with hil sensor.

Edited by Giovanni Annaloro

Merge request reports

Loading