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/multirotor_att_control | |
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/multirotor_att_control')
-rw-r--r-- | apps/multirotor_att_control/multirotor_att_control_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/multirotor_att_control/multirotor_att_control_main.c b/apps/multirotor_att_control/multirotor_att_control_main.c index baee507b2..df08ca75f 100644 --- a/apps/multirotor_att_control/multirotor_att_control_main.c +++ b/apps/multirotor_att_control/multirotor_att_control_main.c @@ -119,9 +119,9 @@ mc_thread_main(int argc, char *argv[]) /* publish actuator controls */ for (unsigned i = 0; i < NUM_ACTUATOR_CONTROLS; i++) actuators.control[i] = 0.0f; - int actuator_pub = orb_advertise(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, &actuators); + orb_advert_t actuator_pub = orb_advertise(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, &actuators); armed.armed = true; - int armed_pub = orb_advertise(ORB_ID(actuator_armed), &armed); + orb_advert_t armed_pub = orb_advertise(ORB_ID(actuator_armed), &armed); /* register the perf counter */ perf_counter_t mc_loop_perf = perf_alloc(PC_ELAPSED, "multirotor_att_control"); |