diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-10-17 10:38:23 +0200 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-10-17 10:38:23 +0200 |
commit | 5d3d17d025fa860879b145a99ec80afb7db38edc (patch) | |
tree | 3e2e5084612f510160d27cfa4300f7b6b95c19a5 /apps/mavlink | |
parent | 32e586d4b7561d1018e29aa59f572c3bac625024 (diff) | |
download | px4-firmware-5d3d17d025fa860879b145a99ec80afb7db38edc.tar.gz px4-firmware-5d3d17d025fa860879b145a99ec80afb7db38edc.tar.bz2 px4-firmware-5d3d17d025fa860879b145a99ec80afb7db38edc.zip |
Increased priority of MAVLink receiver thread
Diffstat (limited to 'apps/mavlink')
-rw-r--r-- | apps/mavlink/mavlink.c | 2 | ||||
-rw-r--r-- | apps/mavlink/mavlink_receiver.c | 5 |
2 files changed, 6 insertions, 1 deletions
diff --git a/apps/mavlink/mavlink.c b/apps/mavlink/mavlink.c index e893ea951..075dc9e3b 100644 --- a/apps/mavlink/mavlink.c +++ b/apps/mavlink/mavlink.c @@ -1,4 +1,4 @@ -/**************************************************************************** + /**************************************************************************** * * Copyright (C) 2012 PX4 Development Team. All rights reserved. * Author: @author Lorenz Meier <lm@inf.ethz.ch> diff --git a/apps/mavlink/mavlink_receiver.c b/apps/mavlink/mavlink_receiver.c index ad46c3ede..060bff2b4 100644 --- a/apps/mavlink/mavlink_receiver.c +++ b/apps/mavlink/mavlink_receiver.c @@ -487,6 +487,11 @@ receive_start(int uart) { pthread_attr_t receiveloop_attr; pthread_attr_init(&receiveloop_attr); + + struct sched_param param; + param.sched_priority = SCHED_PRIORITY_MAX - 40; + (void)pthread_attr_setschedparam(&receiveloop_attr, ¶m); + pthread_attr_setstacksize(&receiveloop_attr, 2048); pthread_t thread; |