-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
Copter: choose RC channel for Transmitter Based Tuning #25203
Conversation
why not just adopt the tx tune used by plane? adding a single vehicle aux function seems like the wrong approach to me |
Because that's a different issue, and Randy was opposed last time it came up. tridge's oldest PR adds that support: #4065 This PR adds flexibility we don't currently don't have, and the problem vexed the author of this PR enough that he made a PR to fix it. I think this PR is well-justified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right. Just a stylistic thing of doing an early-return rather than complicating a compound expression.
Please state what testing has been done.
@peterbarker I've applied the style fix as requested. |
@Hwurzburg Sorry, I'm not a Plane user and I didn't know there was a different transmitter based tuning for Plane. Just my personal opinion, but I think it would be more intuitive if all the RC input settings were in the same place. This could avoid confusion: just looking at all the RCx_OPTION values, users know which transmitter inputs are enabled and for which function. So maybe also Plane could use the same RCx_OPTION value instead of the TUNE_CH parameter. |
Are you still interested in working on this? I would like it as well but it needs to be rebased and some of the comments cleaned up. |
@tpwrules sorry for the late reply, I was quite busy on other projects this month. I can easily rebase it, but as @Hwurzburg pointed out Transmitter Tuning for Plane has a different way to choose the RC channel, so it doesn't seem right to have a different way to set the same function on Copter. |
I agree with others that this PR looks correct. The only change I'd recommend is that the enum used be changed to 219 because that's where we are putting the items that are really sliders/knobs instead of switches. |
I've rebased it and changed the used enum to 219 as @rmackay9 suggested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, nice, thanks!
PeterB's requests have been addressed
I believe we'll need a wiki update on https://ardupilot.org/copter/docs/common-transmitter-tuning.html#common-transmitter-tuning |
It looks like it's failing the Ch6TuningWPSpeed autotest and the code is here. We will just need to add a new parameter setting to the table, probably like this:
|
@be-ska this can be merged when you make the one line change in Tools/autotest/arducopter.py to set the parameter |
Hey @tridge, I've rebased it and modified the |
I've just updated the wiki with PR ArduPilot/ardupilot_wiki#6137 |
Fantastic, thanks @be-ska ! |
This PR add the ability to choose which RC channel controls the Transmitter Based Tuning, instead of the hard coded channel 6.
If a user want to use channel x for transmitter based tuning, the parameter RCx_OPTION should be set to 177 (Transmitter Tuning), as discussed in issue #25186.
The changes has been tested in SITL after setting parameters:
TUNE
21TUNE_MIN
0TUNE_MAX
0.03RC9_OPTION
177Changing the PWM value of CH8 results in different
ATC_RAT_RLL_D
values.