Hey all.
I was just finalizing a new build with the latest gold code. All coming together nicely when I decide. Drum roll Maestro time to try arming.
It tossed a pre arm message at me. Not a big surprise use to that and working through anything giving the machine grief. But this time
I had no clue it said Pre Arm Leaning. huh. the copter was level, calibration was done.
I find no documentation on it so thought I would ask.
I got past it by setting the pre arm checks individually instead of setting to All
Looks like the FC thought the drone was leaning more than the ANGLE_MAX parameter. So I guess you should check two things: first, that ANGLE_MAX is set correctly (it’s in centi-degrees!), and that the drone actually thinks it’s level (check horizon in GCS).
Well I am glad It wasn’t me.
so the GCS is level that was the first thing I checked.
However the ANGLE_MAX I have not checked. Dumb question but whats a centi-degrees
lol
So I happen to have pulled the config on the drone just before I shut it down and this is what the value is.
ANGLE_MAX,4500
There is no way this machine was leaning 45 degree’s the GCS showed level.
It had just been calibrated for Accelerometer…so it knows what level is or at least in theory.
4500 centidegrees is 45 degrees, so yeah that’s fine.
What flight mode are you in? The only other possibility I can think of is that a related parameter like PSC_ANGLE_MAX, LOIT_ANGLE_MAX, or AVOID_ANGLE_MAX is not configured correctly. The documentation says the first two are in degrees, while AVOID is in centidegrees. Not sure if I believe that. Luckily, the first two can be set to 0 and be ignored, so maybe try setting them to 0 and setting AVOID to 4500, if they aren’t already.
I will see what version it is but I am pretty sure it is 3.6.10 as that’s the gold version and this is a brand new build.
Also will see if I can pull a log and share that as well…assuming the problem remains.
In the mean time @Anubis thank you for jumping on this issue its appreciated.
Hi @rickyg32, just from reading the code, your fc “thinks” it is leaning more than 45deg. You might want to try to re-level and re-calibration? If. It shows the error again after reboot you might want to set angle_max to 2500?
HTH,
Gal
Well I tried it again this morning and no error. I didn’t change anything.
I will test it a bunch more before sunday to make sure I don’t have any issues because Sunday is fly day.
What flight controller are you using?
It can be and intermittent sensor failure or initialization error, which can raise question about the the flight controller.
I’m on copter 4.2.2. My Flight controller is Holybro Kakute H7. I thought Calibrate Level would fix my pre-arm leaning issue but that failed, as each time I ran the Calibrate Level command it completed with an error. I recalled my flight controller was mounted upside down. I then updated board orientation roll to 180 to reflect my FC being mounted upside down. After that, I successfully completed Calibrate Level and the pre arm leaning error was no more.