Magfield value always = 0

I’m trying to assemble my first Ardupilot system: it’s ArduRover running on a Pixhawk 2.1 and the vehicle is a RC electric car model.
I can’t really make the vehicle perform autonomous missions, but I’m learning how to do that. Recently I was trying to set the flight mode to Auto but I couldn’t. I noticed the double yellow flashing of the LEDs of my Here+ GPS, so I knew that pre-arm checks failed.
I decided to calibrate accellerometer and compass. Accelerometer was OK, but when I hit the button on Mission Planner to start compass calibration nothing happened. No output at all, not even an error. I didn’t know what to do, but at some point I realized that in the Status pane of Mission Planner the value of magfield and magfield2 was always 0. I’m worried that I might have damaged the Pixhawk, so I was wondering if @proficnc or anyone else in this forum have an idea of what happened to my Pixhawk and what I can do to fix it. Thanks!

what is your setup? photo?

here+ has multiple Mags onboard, so its worth knowing what else you have set up.

best to post a log with prearm logging enabled.

Here you can see a photo of my vehicle


and this is a close-up of the box with all the electronics:

I thought that maybe the permanent magnets of the motor of the vehicle could have damaged some sensors. I don’t know, I’m just guessing.
I don’t really know how to enable prearm logging but I just connected my pixhawk to the ground station through usb and now I can read something from magfield and magfield2! I don’t know what fixed it, may it’s just because I left it far from the motor overnight! Hooray!