[SOLVED] BasicLog example - maximum items in logConfig

Firmware/software/electronics/mechanics
Post Reply
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

[SOLVED] BasicLog example - maximum items in logConfig

Post by wydmynd »

I am trying to log about 20 variables over radio/USB ,
when trying to log over 6 items (float) in one logConf element or block , I get an error.
looking at log.py could not understand where the limit is originating from. the length of a log packet (30) ?
it is possible to add multiple log blocks in parallel , but seems like a strange solution.
Last edited by wydmynd on Tue Aug 25, 2020 6:39 am, edited 1 time in total.
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: BasicLog example - maximum items in logConfig

Post by kimberly »

The limit for one log block is 26 bytes. 6 floats is already 6 x 4 bytes = 24 bytes so if you add more floats you will indeed get issues. We do have an issue open about this since this already seem to happen at only 25 bytes, but 20 x 4 bytes is already way over the limit.

Your only solution is to add multiple log blocks in parallel. If you don't mind that the measurements of different log blocks are not exactly send at the same timestamp, that it should not be a problem. It is just the limitation of what a radio packet can send so unfortunately not much more that we can do about it.
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

Re: BasicLog example - maximum items in logConfig

Post by wydmynd »

OK thanks!
I suggest adding that to the documentation
kimberly
Bitcraze
Posts: 1050
Joined: Fri Jul 06, 2018 11:13 am

Re: [SOLVED] BasicLog example - maximum items in logConfig

Post by kimberly »

Yes I agree it should be in the documentation. I will add it there soon!
Calvin Chua
Member
Posts: 33
Joined: Sun Mar 01, 2020 1:28 am

Re: [SOLVED] BasicLog example - maximum items in logConfig

Post by Calvin Chua »

Hi, is there any sample code or tutorial on parallel logging please?
kristoffer
Bitcraze
Posts: 630
Joined: Tue Jun 30, 2015 7:47 am

Re: [SOLVED] BasicLog example - maximum items in logConfig

Post by kristoffer »

See this post for an example viewtopic.php?f=11&t=4450
wydmynd
Member
Posts: 87
Joined: Thu Dec 06, 2018 9:25 am

Re: [SOLVED] BasicLog example - maximum items in logConfig

Post by wydmynd »

Hi, so in light of recent updates to the logging code in cflib, just wanted to make sure that synclogger is the only way (or recommended way) to log a large amount of variables at once?
didn't exactly understand the improvement in the logging functionality .
Thanks!
Post Reply