Waiting for board to be steady alarm before gryo initialization
« on: December 19, 2020, 03:23:58 am »
This problem came up when I changed from 16.09 to next 782.  I went back to 711 and had the same problem.  Unchecking the box in config...attitude...settings,,,gyro initialization.....wait until the board is steady clears the alarm but it comes back shortly.  It's a Revo...don't know how old or the manufacture.  Here is my UAV file
LJI S380
Revo
4 LDPower 2312 - 960KV
4 FlyColor Raptor 30A
Spektrum SPM4649T
4000 4S1P Battery
8 x 4.5 Props
Ubox Neo M8N with 12c Compass

Re: Waiting for board to be steady alarm before gryo initialization
« Reply #1 on: December 19, 2020, 07:50:21 am »
Ahah.  Looking at your UAV file, I see that you are using DShot which you weren't in 16.09...  I recently tracked down some problems to DShot and after looking at the code, I suggest that you don't use DShot, or if you absolutely must, you should use only the very fastest DShot=1200.  The DShot code disables interrupts, then bit bangs the DShot bits out, then enables interrupts.  That is uh, not the way a real time, interrupt driven system should, uh...
https://forum.librepilot.org/index.php?topic=4883.msg32723#msg32723

Switch to something besides DShot, even if your ESCs don't work, just for a test to see if the warning goes away.

======================================================

Suggestions I wrote before finding that you were using DShot.  You may find them useful if DShot isn't the issue:

Waiting for steady is associated with Basic/Complementary, so I suspect that there is a warning, but it is not actually a waiting for steady issue.

I suspect that checking the box just reinits the Atti and doesn't really do anything when using INS13.

What does the Primary Flight Display show on the Flight Data page?  With vehicle stationary, does the PFC move around?  Also, instead of checking the box, if you rotate the vehicle around in different directions, you may find that the warning goes away (to help diagnose).

In the past when I have had this issue (mainly 16.09), it has been sensor calibration.  In particular, mag sensor.

I grepped in the code and found one match:
flight/modules/StateEstimation/stateestimation.c:        AlarmsSet(SYSTEMALARMS_ALARM_ATTITUDE, SYSTEMALARMS_ALARM_WARNING);
which does say that one of the sensors did not send data.

jdl

  • ***
  • 246
Re: Waiting for board to be steady alarm before gryo initialization
« Reply #2 on: December 19, 2020, 11:29:32 am »
Maybe I'm wrong but it seems to me this setup uses OneShot125, not DSHOT:

line 24 from the attached uav file:
Code: [Select]
<field values="OneShot125,OneShot125,OneShot125,PWM,PWM,PWM" name="BankMode"/>



This situation resembles me INS13 "The Bug" condition when system is left without motion for prolonged time:

https://opwiki.readthedocs.io/en/latest/user_manual/alarms.html
Quote
“The Bug”

There is a very specific condition that can arise within the system that can sometimes occur after the EKF has been initialised, and the vehicle has been left stationary for an extended period of time.

Fortunately this condition is easily detected and the flight firmware mitigates the event. However, the solution is extremely complicated and beyond the capability of most people, and until such stage as the developers have a chance to address the matter, it’s occurrence is indicated as follows:

A large red X appears over the PFD.
A Yellow ATTI alarm with STAB green
This event has been nicknamed “The Bug”, and it is still possible to arm and fly the vehicle in this condition.

Should you wish to clear the indication, one can reset the Revolution flight controller, or alternatively, change the Attitude Estimation Algorithm to Basic(Complementary), and then change back to GPS Navigation(INS13). This action will cause the EKF to reinitialise and the indications will be cleared.


Sorry, could not find the same in the current librepilot documentation.

How long it takes before the ATTI warning appears? A minute or more? Or just few seconds? I do often get this situation with my planes when I leave them still on the ground for minutes while preparing the ground station for take-off, after the INS13 had initialized.

Re: Waiting for board to be steady alarm before gryo initialization
« Reply #3 on: December 19, 2020, 12:07:20 pm »
I just read the JDL post and yes, it does take some time before the red x appears with the warning about wait until board is steady.  I do have One shot 125 ESC's they wont even work if I try D shot, so I don't know why it says d shot in the UAV settings dump fill but it does under actuators.  So, I'll not leave it inactive for so long and report back after testing.  Thanks for the possible solution.
LJI S380
Revo
4 LDPower 2312 - 960KV
4 FlyColor Raptor 30A
Spektrum SPM4649T
4000 4S1P Battery
8 x 4.5 Props
Ubox Neo M8N with 12c Compass

Re: Waiting for board to be steady alarm before gryo initialization
« Reply #4 on: December 19, 2020, 12:25:51 pm »
Bingo.  It takes about 8 minutes of inactivity for the ATTI warning to appear.  Changing to Basic/ Complimentary and then back to INS13 resets it.  Thank you JDL.
LJI S380
Revo
4 LDPower 2312 - 960KV
4 FlyColor Raptor 30A
Spektrum SPM4649T
4000 4S1P Battery
8 x 4.5 Props
Ubox Neo M8N with 12c Compass

jdl

  • ***
  • 246
Re: Waiting for board to be steady alarm before gryo initialization
« Reply #5 on: December 19, 2020, 09:35:33 pm »
Glad I could help.

Developers state and my own experience confirms that "The Bug" condition does not affect the stabilization and the UAV can fly without issues with it.

It might also be a good idea to set the GPS Dynamic Model to Airborne 4G! This minimises position filtering inside the GPS unit and prevents occurence of sudden jumps in position that can disturb attitude estimation.

Re: Waiting for board to be steady alarm before gryo initialization
« Reply #6 on: December 19, 2020, 10:29:07 pm »
Thanks @JDL.  You are right that it is not using DShot.  I just quickly scanned the file and saw the line that says that the DShot mode is 600 - if it is enabled - but it wasn't enabled.  Of course it gets enabled in the bankmode line that you pointed out and bankmode did not say dshot anywhere.

From my post, these refer to facts about "the bug":

Also, instead of checking the box, if you rotate the vehicle around in different directions, you may find that the warning goes away.
Rotate the vehicle with big motions in combinations of roll, pitch and yaw.  This is the way that I got it to reset at the field as I recall.

What does the Primary Flight Display show on the Flight Data page?  With vehicle stationary, does the PFCD move around?
I recall seeing some fairly large smooth rotations happening even before the warning.

I suspect that checking the box just reinits the Atti and doesn't really do anything when using INS13.
Maybe can do this in place of changing AttiEstAlgo and then changing it back.  Maybe can trick System page into just sending INS13 again, which would reinit.

In the past when I have had this issue (mainly 16.09), it has been sensor calibration.  In particular, mag sensor.
At the time, recalibrations made the issue basically non-existent for me.  I often do tests inside my house for hours and don't see it.  First time in a year, I saw it once recently and had to think a while before I even realized what it was.