No pwm outputs when in HITL

In our company, we developed a VTOL simulator. I modified the X-plane link in qgroundcontrol to send data our defined format. Problem is, that on versions 1.8.0 (stable) or 1.9.0 (stable) in qgroundcontrol there are no updates of method QGCXPlaneLink::updateActuatorControls (method from QGroundControl, file:QGCXPlaneLink.cpp). Because of this, I am not able to get PWM outputs to the simulator. A few months ago I tried the latest master (commit:065f97e87ba76664b8db8b7a35507e3ecf2afec7) px4 firmware, where it magically started to update actuator controls. I tried to search for changes in code which cause that it works, but after a week of searching, I am to solve this problem.

Logs from simulated flight:

  1. working version:
  2. non working version - latest stable:
  3. non working version - latest master:

Already checked these things on every version:

  1. Pwm_out_sim is compiled and is running.
  2. Pixhawk has HITL mode enabled.
  3. QgroundControl is connected to a simulator
  4. Pixhawk is armed.

Maybe I will be able to find out how to solve this problem, but I need to know where to look for it. Anyone any idea?


My hunch is that this is connected to the introduction of lockstep simulation. I would suggest that you try disabling it and check if that helps:

You need to understand that it is hard for us to help you if you have modifications or custom simulation setups which are, presumably, not contributed back.

I changed only QGCXPlaneLink::updateActuatorControls method in qgroundcontrol. Everything else is without changes. PX4 is unmodified. I don’t understand, what should I do with disable-lockstep-simulation when it is used in SITL simulation and I use HITL. Right now, I search for commit, which made simulation not working.

Oh sorry, you’re right, I totally confused that.

Is the simulation with XPlane documented somewhere? If yes, I can try to reproduce it and debug it.

Yes. This problem is possible to reproduce with X-plane 10 or 11. HITL documentation is here: As I said, I am trying to find the commit which makes this thing not working. I am between commit 1ef9b5e and 6feee7. 6feee7 works. In a few hours, I will find the problematic commit.

This is the link I shared, maybe your copy&paste didn’t work :smile: Sorry. My mistake.

1 Like

Oh here it is, thanks.

Ok I’ll put that on my list, can’t promise when I get to it.

It looks like upgrading nuttx to version 7.2.8 causes the problem. All commits after commit 1ef9b5e make PWM output not working in HITL simulation. Commit 3859bbb worked for me. I tried to test next commits but I was not able to compile all commits after 3859bbb until commit 1ef9b5e. So the problem is somewhere between 1ef9b5e and 3859bbb.

If you look at the diff:
you can see that also the ecl submodule was updated.

Could you check if the ecl update has anything to do with it or if it’s only the NuttX change?