Hello everybody
I am modifying the PX4 code to create a new module, and in order to do that I am studying the code.
I am looking at commader.cpp V1.10 and there is something that I did not understand.
When the function below is called:
send_vehicle_command(vehicle_command_s::VEHICLE_CMD_DO_SET_MODE, 1, PX4_CUSTOM_MAIN_MODE_MANUAL);
the function below is also called:
**handle_command(vehicle_status_s status_local, const vehicle_command_s &cmd, actuator_armed_s armed_local, uORB::PublicationQueued<vehicle_command_ack_s> &command_ack_pub)
This makes sense to me, but what is not clear is that such function is not called inside send_vehicle_command() function. From tests that I ran, the function is called after the following line:
vcmd_pub.publish(vcmd) in the fuction send_vehicle_command ().
It seems that after the publication, the function is called, but when I follow the .publish(vcmd) I can’t find any caller to that function.
Any advice or comment about it will be appreciate
Thanks in advance