Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
AP_Arming/AP_Terrain: pre-arm check if terrain allocation failed #12796
This adds a pre-arm check that the terrain following could allocate it's memory which resolves this issue: #12574. The user will be aware that the terrain database is not available much earlier than they would have.
As stated in the issue, master currently simply emits a nearly-never-seen text to the GCS saying "Terrain: Allocation failed" and then sets the TERR_ENABLE parameter is set to zero. This means that most users will only find out that terrain is not available when a terrain failsafe triggers during their mission.
This issue can be recreated in master by doing this:
This PR also makes two drive-by fixes to small issues I noticed while working on the main fix: