Compass not detected after importing settings

I swapped FC’s on a copter today. Kakute mini. (Replaced it w/ the same thing).
I built it, then uploaded the parameters from the one I was replacing. I got a compass error, and no ID in the compass device ID. So, I figured my wiring was bad. Swapped them. resoldered them, etc… No luck. tested a different compass. Tested this compass in a different copter, etc,etc…

Finally I reset the parameters to the defaults, and then the compass was detected. I restored the parameters again, and then the compass was not detected after rebooting. I cleared the settings again and uploaded everything except the compass parameters, and that worked.

I’ve swapped FC’s before and never had this happen so thought I’d mention it.

COMPASS_TYPEMASK controls what compass device drivers are disabled, and therefore causes compasses to not be detected. 0 enables all compass drivers.
COMPASS_DEV_ID / 2 / 3 Are the device IDs of your compasses and are set on bootup.

When the compasses are properly detected, check what the value is for this/these parameters. Either remove COMPASS_TYPEMASK from your “.param” file or change it in your file to match the working values.

I just had this same problem on a 4.0.2 craft that had been flying fine(weird coincidence). After doing a diff with the defaults and my non-working list of params.
I found the culprit to be COMPASS_ENABLE=0,it should be 1, and I’m not sure how it changed to 0.

about COMPASS_ENABLE: Setting this to Enabled(1) will enable the compass. Setting this to Disabled(0) will disable the compass. Note that this is separate from COMPASS_USE. This will enable the low level senor, and will enable logging of magnetometer data. To use the compass for navigation you must also set COMPASS_USE to 1.

I’ve seen this before. Not sure what caused it.