I am using Copter4.2, pixhawk4, heli frame. while control the vehicle through the guided mode by a nuc computer with linux system, like the offboard mode in PX4, once i switch to the guided mode and enter the SubMode::TakeOff, an error “prearm Internal error 0X100000, L:602 flow_of_ctr” occurred.
(/home/tutu/Pictures/Screenshot from 2022-05-09 11-15-11.PNG)
Then I read the code in detail and test a lot. At last, find this is due to in Arducopter/mode.cpp/auto_takeoff_run, the SpoolState is always THROTTLE_UNLIMITED when heli. And there is no init_xy_controller before update_xy_controller. then I add the init_xy_controller in function make_safe_ground_handling and it seems worked.
Besides, I also do the same process using quadrotor, the initial error doesn’t display before and after the modification above.
It seems a problem only with heli frame, could someone tell me is there a better solution?
@hututu_duan can you post a log demonstrating this issue. You will have to set the LOG_DISARMED to 1 in order to capture data for this issue. I want to make sure that I can reproduce this in our SITL.
@rmackay9 I will need help from @Leonardthall as I’m pretty sure he has been moving some position controller stuff around that may have caused this.
FWIW I see this on copter from time to time. I think we should just remove the internal error - it’s often wrong and its a pain that you then have to reboot in order to take off again.
@rmackay9@Leonardthall
This is a serious bug that needs to be corrected prior to releasing 4.2.0. It will cause a core dump with heli on the ground rotors turning. Very dangerous.
Here are two ways to cause it
guided mode takeoff
-arm the heli in stabilize
-Enable motor interlock and wait for spool up to complete
-set guided mode
-in mission planner, right click on map and select takeoff and set an altitude
At that point the controller crashes
auto takeoff
-set MIS_OPTIONS to allow arming in auto
-set auto flight mode
-arm the heli
-enable motor interlock
After the rotor spools up, the controller crashes
@rmackay9@hututu_duan
Testing the quadplane4.3.1 firmware today, I found this issue 0X100000.
This error also occurred when I was using version 4.1X 4.23.
It appeared during the take-off phase of the automatic route flight, and it was normal for me to take off with the remote control.