aboutsummaryrefslogtreecommitdiff
path: root/apps/drivers
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2012-12-19 11:34:51 +0100
committerLorenz Meier <lm@inf.ethz.ch>2012-12-19 11:34:51 +0100
commitbc3b66043f57adebdef3980f3a113d2d5362416a (patch)
treef4e79be24be286b286d555a9b02d2f94a9cb4a3d /apps/drivers
parentf41e5728fc132a7cd2764f166e36ca4d2f5909ea (diff)
downloadpx4-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')
-rw-r--r--apps/drivers/hil/hil.cpp1
-rw-r--r--apps/drivers/px4io/px4io.cpp7
2 files changed, 3 insertions, 5 deletions
diff --git a/apps/drivers/hil/hil.cpp b/apps/drivers/hil/hil.cpp
index 67b16aa42..cb4a48fab 100644
--- a/apps/drivers/hil/hil.cpp
+++ b/apps/drivers/hil/hil.cpp
@@ -382,7 +382,6 @@ HIL::task_main()
/* this would be bad... */
if (ret < 0) {
log("poll error %d", errno);
- usleep(1000000);
continue;
}
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 */