Hello, i am trying to read the geo-fence status, i have already enabled the geo-fence from the parameters.
I try the function “gcs_mavlink:send_fence_status()” that i found here: ardupilot/GCS_Fence.cpp at master · ArduPilot/ardupilot · GitHub
but i have the following error " attempt to index a nil value (global ‘gcs_mavlink’)"
Fences are not made available to Lua. It’s been a little bit of a point of contention for several years now, and there is a rather stale PR for them that has not yet been approved.
Going to post this exchange publicly rather than leaving it as a private message:
Creating a binding for fence breach status shouldn’t be too hard to do, but you will need to configure a build environment and use a custom firmware version.
You should be looking in the vehicle specific fence implementations rather than in the GCS messaging for the method you’d like to bind.