2.0.19 quad X
The quad flies ok in stable mode when I trim the sticks, it hovers perfectly for a while. But after short time, the center of the sticks is not neutral anymore. After a while, max stick input is almost not enough to keep the quad straight. If I land and try again it sometimes fixes itself, but after a few turns the sticks neutral point is far off again.
How can I fix this?
Your "problem" is probably just a matter of using some trim on TX. I have never set up a quad that do not need any trimming to fly completely level.
The problem described in this thread causes the quad to constantly change the neutral point, making it impossible to control.
i can not help you if you don't answer my questions ;)
check your gyro offsets and post these values here
reboot and check them a couple of times, they shouldn't change much
if they do, you should check your gyros
I to can confirm this problem as well.
It seems the accelerometers are not doing their job.
My poor quad has been belted around abit so I have assumed I have damaged something
Is there anyway of testing them????
By the way great job guys on this ,very well done.
I'll chime in here to say that I'm seeing some weird yaw behavior as well. Here's the sequence.
Code version: 2.0.20
 On takeoff, it seems to want to yaw clockwise, so I have to hold rudder stick left almost 33% to prevent if from turning.
 As I continue to hold the stick, I need to hold left rudder less and less to the point where eventually it is holding heading without any rudder stick input (centered). This takes around 10 to 15 seconds.
 Then, if I nudge the rudder stick right and center immediately, it starts on an aggressive clockwise yaw and again I have to hold the rudder stick hard left for 5 to 10 seconds and eventually it settles down where it can hold heading with the rudder stick centered.
Some things I have tried (which haven't fixed this behavior):
(a) calibrated compass sensor (although I believe this shoudn't matter since I am not using SIMPLE mode).
(b) Set the Stabilize Yaw "I" value to 0. The thinking here was that if there was a bug in the error accumulation code, this would negate that. It didn't make any difference.
(c) Carefully calibrated the accelerometer during setup; made sure quad was motionless on power-up so that I'd get steady-state gyro calibration.
what logs should I turn on to provide more debugging info?
OK. So I figured out the reason for the weird yaw problem -- it was not because of software.
I saw on the motor outputs that the clockwise motors were consistently using more power -- even during a hover with no yaw.
I have one of those frames with round booms and one of the motor mounts were a bit off. Not very noticeable but enough to cause this problem. Once I straightened this out -- the yaw control started working fine.
Lesson learned was that a quad doesn't have a lot of spare power to correct yaw drift -- compared to roll and pitch since it uses torque differential between the clockwise and counter-clockwise motors. You can see that yourself if you hold the quad in your hand while the motors are running. It will resist pitch and roll movements pretty strongly, but not as strong for yaw movements.
So the slightly tilted motor was producing a constant yaw tendency, causing the clockwise motors to work extra hard to compensate. There was not a lot left over to respond to the rudder stick inputs.
I have tried to "level" the quad with the back raised by 2cm to offset a potential imbalance and to troubleshoot this. but it does not seem to make a difference on backwards drift.
Here the IMU settings:
Gyro offsets: 3.31, -10.05, 9.49
Accel offsets: -3.11, 9.82, 31.58
Gyro offsets: 3.87, -10.07, 9.78
Accel offsets: -3.11, 9.82, 31.58
"When you max to one side for a while, the quad seems to think that is the new centre"
This is exactly what I've seen. Jason mentioned a possible DCM solution drift (though I hate to assume so, considering the minds involved- but it seems to make sense). Jason asked me to grab a log including raw output enabled. Can you snag a log capturing the event and post it here?
that has nothing to do with your gyros drifting ;)
it's just that the accelerometer reads 'level' and the DCM tells another story, so the DCM thinks it's wrong and adjusts itself. But I never experienced this kind of behaviour... (using an older code though...)
a hint for precise leveling: use CDs to lift your quad on these sides, you can get really precise