Pixhawk 4 preflight mag sensor failed and no output for pwm test command


I have a pixhawk 4 and have installed latest release 1.8.2. I tried doing this

pwm arm
pwm test -a -p 1500 -v

on mavlink console but nothing happens on the i/o pwm . I am guesing that the pwm is not armed . On the QGC screen i get a preflight failed : mag inconsistent and it is DISARMED is what it says.

I have two question, is this DISARMED the reason that i am not seeing the output i want to see?
Or is it the something else ?

and also how do I resolve the preflight failed : mag inconsitent ? is it by disablling CAL_MAG_EN0 or changing COM_ARM_MAG value to some higher value (btw this is what i got after looking for - “Preflight failed : mag inconsitent”).

Thanks in advance .

Duplicate of Pwm test not working & preflight fail error

Please don’t double post, it’s rude.