diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-12-19 11:34:51 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-12-19 11:34:51 +0100 |
commit | bc3b66043f57adebdef3980f3a113d2d5362416a (patch) | |
tree | f4e79be24be286b286d555a9b02d2f94a9cb4a3d /apps/drivers/px4io/px4io.cpp | |
parent | f41e5728fc132a7cd2764f166e36ca4d2f5909ea (diff) | |
download | px4-firmware-bc3b66043f57adebdef3980f3a113d2d5362416a.tar.gz px4-firmware-bc3b66043f57adebdef3980f3a113d2d5362416a.tar.bz2 px4-firmware-bc3b66043f57adebdef3980f3a113d2d5362416a.zip |
Cleaned up HIL on FMU / IO combo
Diffstat (limited to 'apps/drivers/px4io/px4io.cpp')
-rw-r--r-- | apps/drivers/px4io/px4io.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/drivers/px4io/px4io.cpp b/apps/drivers/px4io/px4io.cpp index 1fb65413a..695304926 100644 --- a/apps/drivers/px4io/px4io.cpp +++ b/apps/drivers/px4io/px4io.cpp @@ -410,7 +410,6 @@ PX4IO::task_main() orb_publish(_primary_pwm_device ? ORB_ID_VEHICLE_ATTITUDE_CONTROLS_EFFECTIVE : ORB_ID(actuator_controls_effective_1), _t_actuators_effective, &_controls_effective); - /* convert to PWM values */ for (unsigned i = 0; i < _max_actuators; i++) { /* last resort: catch NaN, INF and out-of-band errors */ @@ -426,6 +425,9 @@ PX4IO::task_main() } } + /* publish actuator outputs */ + orb_publish(_primary_pwm_device ? ORB_ID_VEHICLE_CONTROLS : ORB_ID(actuator_outputs_1), _t_outputs, &_outputs); + /* and flag for update */ _send_needed = true; } @@ -570,9 +572,6 @@ PX4IO::io_send() for (unsigned i = 0; i < _max_actuators; i++) cmd.servo_command[i] = _outputs.output[i]; - /* publish as we send */ - orb_publish(_primary_pwm_device ? ORB_ID_VEHICLE_CONTROLS : ORB_ID(actuator_outputs_1), _t_outputs, &_outputs); - // XXX relays /* armed and not locked down -> arming ok */ |