Commit Graph

4 Commits

Author SHA1 Message Date
Peter Barker 7ce353e652 AP_HAL_PX4: use HAL_SEMAPHORE_BLOCK_FOREVER macro 2017-05-08 10:23:03 +09:00
Lucas De Marchi 91dabbe418 AP_HAL_PX4: implement method to ajust periodic callback
Just setting up the periodic callback sampling time on initialization
may not work well for sensors that need to request for a sample with a
bus transaction, sleep and then read the new data. That's because the
function will be kept calling at a periodic rate, while the time in
which we can read the value is not really that sampling time, but rather
the time in which sensor was last read + the time spent in the function
before sending a new sample request.

Instead of creating a new type of thread to handle this case, just
implement the minimal and easy case of updating the period for this
callback, that can only be called from inside the callback function.
2017-03-24 12:06:19 +11:00
Andrew Tridgell f039a37971 HAL_PX4: set names on all bus threads 2016-11-28 10:18:52 +11:00
Andrew Tridgell 1bb450c722 HAL_PX4: moved to common DeviceBus class for thread management in I2C and SPI 2016-11-09 17:07:58 +11:00