-
-
Notifications
You must be signed in to change notification settings - Fork 340
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invalid coefficient of trim value #5656
Comments
It has been like this for a long time - at least 2.8 probably a lot longer. While it could be changed, there is a risk of affecting existing scripts. |
Yes, I know that too, but that excuse is not reasonable. |
|
The cause is this line in mixer.cpp: return calc1000toRESX((int16_t)8 * trim_value); trim_value range is -128 to 128 (or -512 to 512 with extended trims). calc1000toRESX assumes the input value range is -1000 to 1000 and scales it up to -1024 to 1024. |
I am testing by rewriting line 421 of mixer.cpp as shown below.
Although I have only been able to confirm part of it, it seems to be working properly on both the OS and the script so far. |
Is there an existing issue for this problem?
What part of EdgeTX is the focus of this bug?
Transmitter firmware
Current Behavior
In the current EdgeTX, the trim value takes values from -1049 to 1049.
Expected Behavior
The trim value should be -1024~1024.
It has been multiplied by an extra 1.024 somewhere.
1024 x 1.024 = 1048.576 ≒ 1049
Steps To Reproduce
Display the trim value using Lua below.
Version
2.10.5
Transmitter
RadioMaster MT12
Operating System (OS)
No response
OS Version
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: