mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 23:03:35 +08:00
Cleaned up HIL on FMU / IO combo
This commit is contained in:
@@ -382,7 +382,6 @@ HIL::task_main()
|
||||
/* this would be bad... */
|
||||
if (ret < 0) {
|
||||
log("poll error %d", errno);
|
||||
usleep(1000000);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user