55 _capture_pub(nullptr),
56 _camera_capture_feedback(false)
97 _main_task = px4_task_spawn_cmd(
"camera_feedback",
99 SCHED_PRIORITY_DEFAULT + 15,
105 warn(
"task start failed");
130 px4_pollfd_struct_t fds[1] = {};
132 fds[0].events = POLLIN;
140 bool updated =
false;
145 int pret =
px4_poll(&fds[0], (
sizeof(fds) /
sizeof(fds[0])), 20);
148 PX4_WARN(
"poll error %d, %d", pret, errno);
153 if (fds[0].revents & POLLIN) {
198 capture.
q[0] = att.
q[0];
200 capture.
q[1] = att.
q[1];
202 capture.
q[2] = att.
q[2];
204 capture.
q[3] = att.
q[3];
240 PX4_INFO(
"usage: camera_feedback {start|stop}\n");
252 if (!strcmp(argv[1],
"start")) {
255 PX4_WARN(
"already running");
262 PX4_WARN(
"alloc failed");
271 PX4_WARN(
"not running");
274 }
else if (!strcmp(argv[1],
"stop")) {
volatile bool _task_should_exit
int start()
Start the task.
int orb_copy(const struct orb_metadata *meta, int handle, void *buffer)
void stop()
Stop the task.
__EXPORT int param_get(param_t param, void *val)
Copy the value of a parameter.
bool _task_should_exit
if true, task should exit
int orb_subscribe(const struct orb_metadata *meta)
orb_advert_t _capture_pub
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
param_t _p_camera_capture_feedback
CameraFeedback()
Constructor.
int32_t _camera_capture_feedback
int orb_unsubscribe(int handle)
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
__EXPORT int camera_feedback_main(int argc, char *argv[])
~CameraFeedback()
Destructor, also kills task.
__EXPORT param_t param_find(const char *name)
Look up a parameter by name.
CameraFeedback * g_camera_feedback
int orb_check(int handle, bool *updated)
int _main_task
handle for task
static int task_main_trampoline(int argc, char *argv[])
Shim for calling task_main from task_create.
static int orb_publish_auto(const struct orb_metadata *meta, orb_advert_t *handle, const void *data, int *instance, int priority)
Advertise as the publisher of a topic.