Page 1 of 1
What's the role of function workerLoop
Posted: Tue Sep 20, 2016 10:17 am
by wenlong
I did not really understand the role of workerLoop, could anyone give some suggestion, thanks
Re: What's the role of function workerLoop
Posted: Tue Sep 20, 2016 11:24 am
by arnaud
Hi wenlong,
Could you maybe add some context? I am assuming you are talking about the Crazyflie firmware but since you are posting in general/quadcopters I am not sure. What worker loop are you referring to?
Best,
Arnaud
Re: What's the role of function workerLoop
Posted: Fri Oct 28, 2016 8:42 am
by wenlong
Hi arnuad,
I'm sorry to reply you so late1
Yes, I did talk about the Crazyflie firmware. The function workerLoop is called in file system.c and defined in file worker.c.
I think this function was just used for communication logs? Is this right?
Sincerely
Re: What's the role of function workerLoop
Posted: Fri Oct 28, 2016 8:53 am
by arnaud
Hi,
The worker loop is a generic system that allows to run functions asynchronously. It is possible that it is used only for log in the current firmware but it is designed as a generic mechanism that could be used by other subsystem. The idea was that if a subsystem needs to run low priority non-real time quick jobs there should be no need to have a task for it, the worker loop can carry these jobs.
Best,
Arnaud
Re: What's the role of function workerLoop
Posted: Mon Oct 31, 2016 2:20 am
by wenlong
Thanks, arnuad! I got it