I’m trying to customize a MAV_CMD so that the corresponding VEHICLE_CMD in PX4 directory can control a switch between PID and a self-designed control strategy.
I have followed the guide in MAVLINK and QGC documents and modified XML definition files of MAV_CMD, joystick plugins, px4firmwareplugins.cc, and vehicle.cc in QGC src directory. But whenever I open QGC and press the button assigned to the new MAV CMD, QGC shows an error message with “MAV_CMD command not supported”. Another fact is that when QGC emits this error message, the PX4 code running in SITL does receive the corresponding VEHICLE_CMD and prints a message on the screen.
So it seems that the QGC does not recognize the MAV_CMD even though the PX4 has already got that signal. I guess I have missed some files that need to be modified in QGC directory, but I have no idea what files I should work on. Thanks for any hints or help about how to create a new MAV_CMD and get it into work.