From 9fa794a8faa2d30023d9943beae55a05ed4e48a0 Mon Sep 17 00:00:00 2001 From: px4dev Date: Fri, 30 Nov 2012 00:02:47 -0800 Subject: Rework the PX4IO software architecture: - Use a separate thread for handing R/C inputs and outputs. - Remove all PX4IO R/C receiver configuration; it's all automatic now. - Rework the main loop, dedicate it to PX4FMU communications after startup. - Fix several issues in the px4io driver that would cause a crash if PX4IO was not responding. --- apps/px4io/px4io.h | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'apps/px4io/px4io.h') diff --git a/apps/px4io/px4io.h b/apps/px4io/px4io.h index 0a3a4448c..2ecab966d 100644 --- a/apps/px4io/px4io.h +++ b/apps/px4io/px4io.h @@ -147,7 +147,7 @@ extern volatile int timers[TIMER_NUM_TIMERS]; /* * Mixer */ -extern int mixer_init(void); +extern void mixer_tick(void); /* * Safety switch/LED. @@ -158,15 +158,16 @@ extern void safety_init(void); * FMU communications */ extern void comms_init(void); -extern void comms_check(void); +extern void comms_main(void) __attribute__((noreturn)); /* - * Serial receiver decoders. + * R/C receiver handling. */ -extern void dsm_init(unsigned mode); -extern void dsm_input(int fd); -extern void sbus_init(unsigned mode); -extern void sbus_input(int fd); +extern void controls_main(void); +extern int dsm_init(const char *device); +extern void dsm_input(void); +extern int sbus_init(const char *device); +extern void sbus_input(void); /* * Assertion codes -- cgit v1.2.3