diff options
author | px4dev <px4@purgatory.org> | 2012-08-21 23:44:22 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-08-21 23:44:22 -0700 |
commit | 88f0080a0ffb299006950c0453eabddb7d17f078 (patch) | |
tree | ea769b9b10ba256942ec93d5b42515f1057f7f4f /apps/mavlink/mavlink.c | |
parent | 8c22e2a092a5527e5e4af2a54ecdeac586ffbfa7 (diff) | |
download | px4-firmware-88f0080a0ffb299006950c0453eabddb7d17f078.tar.gz px4-firmware-88f0080a0ffb299006950c0453eabddb7d17f078.tar.bz2 px4-firmware-88f0080a0ffb299006950c0453eabddb7d17f078.zip |
Fix an architectural issue with the ORB that prevented publication from interrupt context.
ORB topic advertisements are now global handles that can be used in any context. It is still possible to open a topic node as a publisher, but it's not the default. As a consequence, the type of the handle returned from orb_advertise has changed; all other API remains the same.
Diffstat (limited to 'apps/mavlink/mavlink.c')
-rw-r--r-- | apps/mavlink/mavlink.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apps/mavlink/mavlink.c b/apps/mavlink/mavlink.c index 7fba65cb7..97822510c 100644 --- a/apps/mavlink/mavlink.c +++ b/apps/mavlink/mavlink.c @@ -113,7 +113,7 @@ static struct vehicle_status_s v_status; static struct rc_channels_s rc; /* HIL publishers */ -static int pub_hil_attitude = -1; +static orb_advert_t pub_hil_attitude = -1; /** HIL attitude */ static struct vehicle_attitude_s hil_attitude; @@ -126,16 +126,16 @@ static struct ardrone_motors_setpoint_s ardrone_motors; static struct vehicle_command_s vcmd; -static int pub_hil_global_pos = -1; -static int ardrone_motors_pub = -1; -static int cmd_pub = -1; +static orb_advert_t pub_hil_global_pos = -1; +static orb_advert_t ardrone_motors_pub = -1; +static orb_advert_t cmd_pub = -1; static int sensor_sub = -1; static int att_sub = -1; static int global_pos_sub = -1; static int local_pos_sub = -1; -static int flow_pub = -1; -static int global_position_setpoint_pub = -1; -static int local_position_setpoint_pub = -1; +static orb_advert_t flow_pub = -1; +static orb_advert_t global_position_setpoint_pub = -1; +static orb_advert_t local_position_setpoint_pub = -1; static bool mavlink_hil_enabled = false; static char mavlink_message_string[51] = {0}; |