diff options
author | px4dev <px4@purgatory.org> | 2013-04-28 18:14:46 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-04-28 18:14:46 -0700 |
commit | e67022f874f0fa091ed7dffd617c70c0c0253b5c (patch) | |
tree | 4308fd72c7dc6f782d464ac5886b226c371fd74d /src/modules/px4iofirmware/px4io.c | |
parent | 8f7200e0114d6bd9fcac7ec088b125e54761c2e0 (diff) | |
download | px4-firmware-e67022f874f0fa091ed7dffd617c70c0c0253b5c.tar.gz px4-firmware-e67022f874f0fa091ed7dffd617c70c0c0253b5c.tar.bz2 px4-firmware-e67022f874f0fa091ed7dffd617c70c0c0253b5c.zip |
Serial interface for IOv2
Diffstat (limited to 'src/modules/px4iofirmware/px4io.c')
-rw-r--r-- | src/modules/px4iofirmware/px4io.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/modules/px4iofirmware/px4io.c b/src/modules/px4iofirmware/px4io.c index 39f05c112..385920d53 100644 --- a/src/modules/px4iofirmware/px4io.c +++ b/src/modules/px4iofirmware/px4io.c @@ -142,7 +142,7 @@ user_start(int argc, char *argv[]) LED_BLUE(false); LED_SAFETY(false); - /* turn on servo power */ + /* turn on servo power (if supported) */ POWER_SERVO(true); /* start the safety switch handler */ @@ -154,13 +154,11 @@ user_start(int argc, char *argv[]) /* initialise the control inputs */ controls_init(); -#ifdef INTERFACE_I2C - /* start the i2c handler */ - i2c_init(); -#endif -#ifdef INTERFACE_SERIAL - /* start the serial interface */ -#endif + /* start the FMU interface */ + interface_init(); + + /* add a performance counter for the interface */ + perf_counter_t interface_perf = perf_alloc(PC_ELAPSED, "interface"); /* add a performance counter for mixing */ perf_counter_t mixer_perf = perf_alloc(PC_ELAPSED, "mix"); @@ -203,6 +201,11 @@ user_start(int argc, char *argv[]) /* track the rate at which the loop is running */ perf_count(loop_perf); + /* kick the interface */ + perf_begin(interface_perf); + interface_tick(); + perf_end(interface_perf); + /* kick the mixer */ perf_begin(mixer_perf); mixer_tick(); |