A compass on the priority list did not show up at start-up
What ArduPilot says:
- Compass N not found
ArduPilot keeps a list of the compasses it expects, in order of preference: COMPASS_PRIO1_ID, COMPASS_PRIO2_ID, COMPASS_PRIO3_ID (each holds a device ID). The message gives the place in that list, 1 to 3, of a compass that is switched on for heading but was not detected when the flight controller started.
What to do, most likely first
The GPS/compass module is unplugged, or its I2C wires (SDA, SCL) are broken or swapped.
CheckMost GPS modules carry the compass on two extra wires. With them connected correctly the compass appears in the ground station's compass screen after a reboot.
FixReconnect it (SDA to SDA, SCL to SCL, power and ground) and reboot. The Board & Wiring Planner shows where the I2C pads are on your board.
A DroneCAN compass did not start: CAN is not enabled, or the node had no power.
CheckA CAN compass needs
CAN_P1_DRIVER1 andCAN_D1_PROTOCOL1, and its node must be listed in the ground station's DroneCAN screen.FixEnable CAN, check the cable and its power, and reboot.
The compass was removed on purpose, but its ID is still on the list.
CheckThe ID at the place the message gives (
COMPASS_PRIO1_ID,COMPASS_PRIO2_IDorCOMPASS_PRIO3_ID) belongs to hardware that is no longer there.FixSet that parameter to 0 and reboot. Starting a calibration of all compasses also drops missing ones from the list (“Mag: Compass #… removed”); reboot after it.
This message counts places from 1; “Mag: Compass #0 … removed” counts from 0. Both mean the first place on the list.
Parameters to look at
| Parameter | What it is |
|---|---|
COMPASS_PRIO1_ID | Compass device id with 1st order priority |
COMPASS_PRIO2_ID | Compass device id with 2nd order priority |
COMPASS_PRIO3_ID | Compass device id with 3rd order priority |
COMPASS_USE | Use compass for yaw |
COMPASS_USE2 | Compass2 used for yaw |
COMPASS_USE3 | Compass3 used for yaw |
CAN_P1_DRIVER | Index of virtual driver to be used with physical CAN interface |
CAN_D1_PROTOCOL | Enable use of specific protocol over virtual driver |
Where to do it:Board & Wiring PlannerSetup & Tuning Guide
The code that sends it
Compass N not found
libraries/AP_Compass/AP_Compass.cpp Compass::configured() · Open in ArduPilot Copter-4.7.1