I noticed it’s currently not possible to set ACRO_Y_EXPO to any value smaller than 0.5, except 0.
The desired value (let’s say 0.3) is overwritten to 1 at next reboot.
Is this normal? If not, maybe the range check performed in Attitude.cpp, lines 21-23, should be replaced by something like this:
if (g2.acro_y_expo > 1.0f) {
g2.acro_y_expo = 1.0f;
}
else if (g2.acro_y_expo < -0.5f){
g2.acro_y_expo = -0.5f;
}
Since this part of the code was written 4 years ago by @Leonardthall and @rmackay9 and no one complained about it since then, I didn’t dare to open an issue on ArduPilot’s GitHub
Maybe I don’t quite understand how this parameter works?
Yeh, I was thinking about this but I decided to stick to 0 to 1 range. The equation does work down to -0.5 but I do not believe that the utility of negative values justifies the potential for added support and mistakes.
It is also a change from intended behaviour and that requires significantly more input from the development team before I could murge the fix.
So for now I have done a PR to fix the bug and maintain the intended behavior.
Thanks again for pointing out the bug!! If I meet you in person I will buy you a drink