SEND and RECEIVE ArduCopter Parameters

Hi folks, I am new to APM programming and basically trying to find my way through GCS code typically for requesting and sending params with new values with mavlink messages #20,#21,#22,#23. I need to download all copter params with “mavlink_msg_param_request_list_pack(xx)” or mavlink_msg_param_request_list_send(xx)" at the GCS with C/C++ code. I can read all the mavlink messages such as MAVLINK_MSG_ID_ATTITUDE. I’m using UDP to bind to SIL and than sending mavlink messages consequently receiving the response as well. But I don’t know which structure to use and how to receive parameter list. Please guide. Cheers.

//

mavlink_msg_param_request_read_pack(0, 255, &msg, 1, 0, prm, -1);
len = mavlink_msg_to_send_buffer(buf, &msg);
bytes_sent = sendto(sock, buf, len, 0, (struct sockaddr*)&gcAddr, sizeof(struct sockaddr_in));

//

1 Like

Facing the same problem here, have you figured out how to do that in c++ ? I am referring to https://mavlink.io/en/protocol/parameter.html without making any headway.