Throttle doesn't work in X-plane 11 when try to enable servo in HITL mode

I’m trying to enable real world servos while in HITL Mode. I’m using QGC version 3.5.6 and X-plane 11 and edited px4 firmware.
The files I have edited in order to make the servos work in HITL mode are:
i) Commented this line: https://github.com/PX4/Firmware/blob/b1dc1b1ecd479cc7d608f1d2df53f08fe45ecfb7/ROMFS/px4fmu_common/init.d/rcS#L357
ii) Commented this line: https://github.com/PX4/Firmware/blob/f160743df40b9dcc9558f3df1c6eeaf56646a758/src/modules/commander/state_machine_helper.cpp#L184

The result of this is that only airelon in X-plane 11 and one servo connected to Pixhawk works when moved with RC. And, no throttle,pitch,yaw works in X-plane 11 as well as other servos connected to Pixhawk also don’t work.

Thanks.

I got it working. This is what I did:

  1. I used the latest px4 firmware (v1.11.1 - also works on current master branch)
  2. I only changed one file (state_machine_helper.cpp): Commented the line armed->lockdown = true; inside if (hil_enabled) { block
  3. I compiled, built and then uploaded this firmware in QGC v3.5.6
  4. In QGC I disabled HITL then rebooted vehicle and then selected Standard-Plane as the airframe
  5. I pressed the safety switch to check if my servos are working as per the radio control.
  6. Then, I enabled HITL, again rebooted the vehicle and selected ‘HIL-Star’ as my airframe.

Note: At this point, the servos should still be active and controlled by radio.

  1. I launched XPlane-11 and started a flight
  2. In QGC, I opened the HIL widget to connect with X-Plane 11
  3. Then, I armed the vehicle

After arming; the real servos and the X-Plane aircraft wings should both be working and you should also be able to fly the plane using the radio.

I hope this helps someone

Hi!
I’m experiencing the same issue. I’m connecting Pixhawk Orange Cube Plus with QGroundControl v4.4.3, PX4 v1.14.2, and Gazebo version 11.15.1. HITL is enabled. I’m not using an RC transmitter. The content of PX4-Autopilot/ROMFS/px4fmu_common/init.d/rcS is very different for me. What do you suggest I do?"