PX4-Autopilot: HIL: disable lockdown not working
When in HIL mode (SYS_AUTOSTART: 1000) I find it impossible to enable servos. I suppose that running the command px4io lockdown disable
should do the trick but nothing happens. Also running pwm arm
in HIL returns
nsh> pwm arm
ERROR [pwm] PWM_SERVO_SET_ARM_OK
ERROR [pwm] Task exited with errno=22
Am I missing something?
Version:
nsh> ver all
HW arch: PX4FMU_V2
FW git-hash: 263b2a63ea6abfab48b00b713e4d3c77d20213e5
FW version: v1.5.0-1-g263b2a6 (1.5.0 0), 17104896
OS version: 6.27 (4294967295)
Build datetime: Oct 17 2016 13:39:11
Toolchain: 4.7.4 20140401 (release) [ARM/embedded-4_7-branch revision 209195]
MCU: STM32F42x, rev. A
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 16 (5 by maintainers)
I got it working. This is what I did:
I used the latest px4 firmware (v1.11.1 - also works on current master branch) I only changed one file (state_machine_helper.cpp): Commented the line armed->lockdown = true; inside if (hil_enabled) { block I compiled, built and then uploaded this firmware in QGC v3.5.6 In QGC I disabled HITL then rebooted vehicle and then selected Standard-Plane as the airframe I pressed the safety switch to check if my servos are working as per the radio control. 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.
I launched XPlane-11 and started a flight In QGC, I opened the HIL widget to connect with X-Plane 11 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.
@SkyDeBaun Please don’t append to old and closed issues.