Is it possible to call & change a parameter declared in libraries in Arducopter>events.cpp?
I understand there is probably a lot of redundancy built into the codebase to prevent parameters being set during flight. I just think since i am calling it in a failsafe event it should be possible.
I have never tried that but I think you can achieve what you want using: MAV_CMD_DO_SET_PARAMETER. You can send this command in GUIDED mode from your script or add this to the mission item list.
Sorry for the incorrect information since MAV_CMD_DO_SET_PARAMETER is not implemented yet.
May I ask which parameter you want to change?
There is no parameter declaration in events.cpp.
But you can always change a listed parameter in here using parameter protocol by pymavlink, changing the parameter values in some ground control station software like Mission Planner, mavproxy and writing it to the vehicle or simply setting vehicle.parameters["PARAM_NAME"] = VALUE in dronekit.
EDIT:
I don’t think this is an ArduPilot problem. It sounds like perhaps you have a receiver mis-configuration. Generally speaking, it should stop sending pulses when the transmitter loses connection. See this link: Radio Failsafe — Copter documentation
There seems to be no receiver configuration for the Herelink - Air Unit receiver, very limited documentation on that. The link demonstrates how to configure older receivers, which usually have a F/S binding button.
Yeah, having a script to detect a failsafe and set a parameter change is what I’m going for at the moment.
Ok, according to another forum post on another site, you cannot change the Herelink failsafe behavior (which makes it a poor choice, in my opinion).
You should look into Lua scripting for this purpose. I don’t have a Herelink transmitter, so I cannot test for the conditions present during an RC failsafe with that hardware.