I want to calculate the motorratios on the client. Therefor I have to get the gyro data and euler-angles. Ideally I send the motorratios to the crazyflie and the response (I think there is one?) contains the data I'm interested in. But I'm not sure where I have to make the adjustments. So can you pls tell me if my understanding of the communication is right? Or tell me how to customize the response if I'm totally wrong...
crtpRxTask manages the received packets. "link->receivePacket" fetches a new packet. I don't really know what "if(queues[p.port]" checks!? But if it is successfull the packet gets pushed in the send-queue? So before this instruction I have to check if p.port equals 3 (= commands port) and if necessary update the packet with my data?
To get the angles from the copter you can use the Log subsystem, it has been designed for this kind of task. You can setup one log packet with all the data you are interested into and it will be sent by the copter.
The code you copied is the low level of CRTP and you should not have to touch it, instead you can register for a new port and setup a callback or listen to the queue.
I've already used the logging system but for some reasons my regulator doesn't work. At the moment I think, that the logged data are not "up to date". See also my other thread: viewtopic.php?f=6&t=1708
To get the angles from the copter you can use the Log subsystem, it has been designed for this kind of task. You can setup one log packet with all the data you are interested into and it will be sent by the copter.