sync logging method in cflib

Post here to get support
Post Reply
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

sync logging method in cflib

Post by wydmynd »

hi
this great tutorial explains how to log variables using regular and sync methods. But I'm not sure what are the dis/advantages of each. As I understand the sync method, there is a loop somewhere that grabs variables so you can be sure they were all grabbed from memory in the timeframe of the loop (whatever that is) and it is "blocking" (blocking what?). the "regular" method is asynchronous so it sends using some callback whenever a new value is available?
thanks!
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: sync logging method in cflib

Post by kimberly »

Hi!

Do you mean this tutorial? THe other one was just pointing to an early version of the crazyflie-lib repo.

You grabbed the concept pretty well. For most users I would say that the async and sync doesn't really differ in terms disadvantages or advantages. Async is better for fast logging but ofcourse the best logging is done with the SD card deck right onboard. I like to use async myself since it keeps the functions of the script separate and its much more clear what is going on.

But I guess if you want the crazyflie to react on exactly the same logging variables on the same timestep as it's state machine is in, then maybe syncing is better, but like I said for most users it doesn't really matter.
Post Reply