Ahrs:healthy() returns true even with PreArm errors

Arducopter 4.4.3
I need to check if there’s no errors, turn on led light to notify user that drone is ready to arm
But ahrs:healthy() returns true even is there’re PreArm errors (Need position estimate, etc)

It’s a bug or i should use another function?

There are STATUS bits on SYS_STATUS Mavlink message that is a better source of information

1 Like

How i can use it in lua?

arming:pre_arm_checks() - this worked…

Now i have another issue:

16.11.2023 15:34:59 : isarm’ (too few arguments)
16.11.2023 15:34:59 : Lua: ./scripts/test.lua:183: bad argument #0 to 'd

arming.disarm()

What argument should i pass? Where i can documentation or it doesn’t exists?