Hey all,
i creat new app in PX4 that publish in to vehicle_command.msg
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <px4_config.h>
#include <px4_tasks.h>
#include <px4_posix.h>
#include <unistd.h>
#include <stdio.h>
#include <poll.h>
#include <string.h>
#include <math.h>
#include <uORB/uORB.h>
#include <uORB/topics/vehicle_command.h>
__EXPORT int NEW_module_main(int argc, char *argv[]);
int NEW_module_main(int argc, char *argv[])
{
struct vehicle_command_s comd;
memset(&comd, 0, sizeof(comd));
orb_advert_t comd_pub = orb_advertise(ORB_ID(vehicle_command), &comd);
comd.command = 1;
orb_publish(ORB_ID(vehicle_command), comd_pub, &comd);
return 0;
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
when i run it using qgroundcontrol it dosn’t publish, i tried the same code using other message “home_position” and it work.
Someone can help or explain why it cannot publish using vehicle_command.msg ?
Ty