diff options
author | px4dev <px4@purgatory.org> | 2012-11-30 00:02:47 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-11-30 00:02:47 -0800 |
commit | 9fa794a8faa2d30023d9943beae55a05ed4e48a0 (patch) | |
tree | cc05d6eafae584fb6c5cdfc731ece7f8be5f8f82 /apps/px4io/mixer.c | |
parent | e153476950a3fbda230c6bddd9ad35018cfda559 (diff) | |
download | px4-firmware-9fa794a8faa2d30023d9943beae55a05ed4e48a0.tar.gz px4-firmware-9fa794a8faa2d30023d9943beae55a05ed4e48a0.tar.bz2 px4-firmware-9fa794a8faa2d30023d9943beae55a05ed4e48a0.zip |
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.
Diffstat (limited to 'apps/px4io/mixer.c')
-rw-r--r-- | apps/px4io/mixer.c | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/apps/px4io/mixer.c b/apps/px4io/mixer.c index 572344d00..61e716474 100644 --- a/apps/px4io/mixer.c +++ b/apps/px4io/mixer.c @@ -60,17 +60,6 @@ */ static unsigned fmu_input_drops; #define FMU_INPUT_DROP_LIMIT 20 - -/* - * HRT periodic call used to check for control input data. - */ -static struct hrt_call mixer_input_call; - -/* - * Mixer periodic tick. - */ -static void mixer_tick(void *arg); - /* * Collect RC input data from the controller source(s). */ @@ -92,20 +81,8 @@ struct mixer { /* XXX more config here */ } mixers[IO_SERVO_COUNT]; -int -mixer_init(void) -{ - - - /* look for control data at 50Hz */ - hrt_call_every(&mixer_input_call, 1000, 20000, mixer_tick, NULL); - - return 0; -} - - -static void -mixer_tick(void *arg) +void +mixer_tick(void) { uint16_t *control_values; int control_count; |