55 PX4_WARN(
"Faild to access shared memory");
59 if ((
_mem = (
int *) shmat(
_shmid, NULL, 0)) == (
void *) - 1) {
60 PX4_WARN(
"Faild to map shared memory");
65 for (i = 0; i < input_rc_s::RC_INPUT_MAX_CHANNELS; ++i) {
79 PX4_WARN(
"error: RC initialization failed");
113 _data.
values[i] = (value <= 0) ? UINT16_MAX : value;
140 PX4_ERR(
"%s", reason);
143 PX4_INFO(
"rpi_rc_in {start|stop|status}");
149 usage(
"missing command");
153 if (!strcmp(argv[1],
"start")) {
156 PX4_INFO(
"already running");
165 PX4_ERR(
"Rc input module initialization faild");
172 PX4_ERR(
"Rc input module failure");
178 if (!strcmp(argv[1],
"stop")) {
181 PX4_WARN(
"Not running");
203 if (!strcmp(argv[1],
"status")) {
208 PX4_INFO(
"Not running");
214 usage(
"rpi_rc_in start|stop|status");
#define RCINPUT_MEASURE_INTERVAL_US
#define ORB_ID(_name)
Generates a pointer to the uORB metadata structure for a given topic.
static void usage(const char *reason)
Print the correct usage.
int orb_publish(const struct orb_metadata *meta, orb_advert_t handle, const void *data)
int rpi_rc_in_main(int argc, char **argv)
static RcInput * rc_input
orb_advert_t orb_advertise_multi(const struct orb_metadata *meta, const void *data, int *instance, int priority)
__EXPORT hrt_abstime hrt_absolute_time(void)
Get absolute time in [us] (does not wrap).