No memory was left at start-up for terrain data or ADS-B
What ArduPilot says:
- PreArm: ADSB out of memory
- PreArm: Terrain out of memory
At start-up the terrain database (height of the ground from files on the SD card) or the ADS-B receiver's list of aircraft asked for working memory and did not get it. The feature is switched on but cannot run, so arming is refused.
What to do, most likely first
The feature is on but you do not use it.
FixSet
TERRAIN_ENABLEto 0, orADSB_TYPEto 0, and reboot.You need it, and something else took the memory: Lua scripting is the usual one.
CheckThe ground station's free-memory reading, or the file @SYS/memory.txt, shows what is left.
FixLower
SCR_HEAP_SIZEor switch off scripts you do not need, and reboot. A board with little memory cannot run everything at once.
Parameters to look at
| Parameter | What it is |
|---|---|
TERRAIN_ENABLE | Terrain data enable |
ADSB_TYPE | ADSB Type |
SCR_ENABLE | Enable Scripting |
SCR_HEAP_SIZE | Scripting Heap Size |
The code that sends it
PreArm: ADSB out of memory
libraries/AP_Arming/AP_Arming.cpp AP_Arming::system_checks() · Open in ArduPilot Copter-4.7.1
PreArm: Terrain out of memory
libraries/AP_Arming/AP_Arming.cpp AP_Arming::system_checks() · Open in ArduPilot Copter-4.7.1