How to log arrays

Firmware/software/electronics/mechanics
Post Reply
chopin
Beginner
Posts: 18
Joined: Thu Sep 26, 2019 5:39 am

How to log arrays

Post by chopin »

Hello, I've seen here https://github.com/bitcraze/crazyflie-f ... .h#L54-L62 that you can only log ints or floats.
We have a sensor that sends many measurements so we wanted to know whether there's a convenient way to send them all in one array (or something similar) instead of having a lot of `LOG_ADD`s.
Thanks!
tobias
Bitcraze
Posts: 2339
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: How to log arrays

Post by tobias »

How big is the array? If you can fit it within on log packet (26 bytes) it is efficient as it only contains the binary data.
chopin
Beginner
Posts: 18
Joined: Thu Sep 26, 2019 5:39 am

Re: How to log arrays

Post by chopin »

The array has 18 `uint16_t`s. For now we just `LOG_ADD` 18 times and it works fine, we just wanted to know whether there's a more elegant way of doing this.
Post Reply