mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-05 21:23:58 -04:00
This converts MS56XX to use the thread started by SPI/I2C instead of using the timer thread. This also fixes a possible starvation of the main thread: 1) INS driver registers itself to be sampled on timer thread 2) MS56XX registers itself to be sampled on timer thread 3) Main thread waits for a sample from INS with ins.wait_for_sample() 4) timer thread is waiting on update from MS56XX and consequently the main thread is waiting on an I2C/SPI transfer Besides this starvation there's another one due to reuse of the timer lock in order to pump values from the timer thread to the main thread. A call to the update() method when we have a sample available would need to wait on any other driver holding the timer lock. Now there's a lock just to pass the new values from the bus thread to the main thread with a very tiny critical region, not waiting on any bus transfers and/or syscalls. |
||
---|---|---|
.. | ||
examples/BARO_generic | ||
AP_Baro_Backend.cpp | ||
AP_Baro_Backend.h | ||
AP_Baro_BMP085.cpp | ||
AP_Baro_BMP085.h | ||
AP_Baro_HIL.cpp | ||
AP_Baro_HIL.h | ||
AP_Baro_MS5611.cpp | ||
AP_Baro_MS5611.h | ||
AP_Baro_PX4.cpp | ||
AP_Baro_PX4.h | ||
AP_Baro_qflight.cpp | ||
AP_Baro_qflight.h | ||
AP_Baro_QURT.cpp | ||
AP_Baro_QURT.h | ||
AP_Baro.cpp | ||
AP_Baro.h |