Mavlink Log frequencies and

Take a look at the SRn parameters where n is the serial port. Pixhawk usb is serial port 0.

Regarding the source code, data_stream_send is called by the scheduler, and the message is actually sent according to the SRn parameters.

You can also use the REQUEST_DATA_STREAM command using the MAV_DATA_STREAM enum, but this is just another way of setting the SRn parameters. Be careful playing with these things while using MAVProxy, mavproxy periodically requests a certain streamrate for all streams. Using mavproxy, you can change the streamrate of all streams with the command set streamrate 10 (10Hz). The maximum rate for any stream is 50Hz.