I’m developing a SITL simulator for my drone, and would like to add a virtual RC in the display screen.
Now my simulator can send sensors inputs, read actuators outputs, but I cannot figure out how to send remote control inputs.
I tried sending messages via
mavlink_msg_hil_rc_inputs_raw_encode_chan (as I used
mavlink_msg_hil_sensor_encode_chan for sending GPS and IMU values). But my PX4 code does not seem to see these values changed.
Is there a config somwhere to change so that I can get RC from the SITL simulator? Can someone help me find out where my mistake is?
My other option would be to modify the joystick UI of QGroundControl, as I need two thumbpads, two switches and two potentiometers. I modified the UI, and tried to replace
mavlink_msg_manual_control_pack_chan in UAS.cc by
mavlink_msg_rc_channels_pack_chan to have enough channels, but still no luck.
If someone can help me for one or the other solution, that would be great.
Thanks in advance,