afry-south / dragonfly-fcb

ÅF Dragonfly Quadrotor UAV Project
Other
7 stars 3 forks source link

Use semaphore to sync value printing tasks #111

Closed stenbergd closed 8 years ago

stenbergd commented 8 years ago

To get "live" printing of values from print sampling tasks, perhaps use a semaphore that gives after each reading of receiver values, sensor values etc.

stenbergd commented 8 years ago

Perhaps do not do this for receiver since it has 6 channels that will not be updated simultaneously.

stenbergd commented 8 years ago

For sensors, do sem give every time a new sensor value is taken. It doesn't matter if the other sensor values haven't been updated just print it all anyway.

When starting sampling task, create the semaphore. Then delete it when stopping task. (Check that it is not NULL before giving, taking and deleting!)

stenbergd commented 8 years ago

Maybe we should ignore this for now... Closing.