bitcraze / crazyflie-firmware

The main firmware for the Crazyflie Nano Quadcopter, Crazyflie Bolt Quadcopter and Roadrunner Positioning Tag.
GNU General Public License v3.0
1.21k stars 1.06k forks source link

Log and Param types not matching #821

Closed trakevital closed 3 years ago

trakevital commented 3 years ago

I am currently working on a project with crazyflies and am using the crtp protocol. I encountered something today which I have just realized: The Log and Param type #defines do not match! image image I would suggest you to change it in order to prevent confusion in the future. In my opinion the best implementation was in the param due to the user-freindly macros.

trakevital commented 3 years ago

I understand this will be very difficult to change because many infrastructures were implemented using this method and so it probably won't be a good idea to change the implementation now... Basically it's too late

ataffanel commented 3 years ago

Thanks for the report but it is indeed way too late for this change. I can understand the frustration, overall the CRTP protocol needs to be documented much better.

This was actually done a bit on purpose: log and param are using the same TOC protocol. The type in the toc is specific to the subsystem that implements the TOC: it was envision that TOC could be used for more subsystems. So by having two different types, it forces implementation to treat the type as a generic.