-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
FW: Allow manual throttle increase in auto controlled modes #3278
FW: Allow manual throttle increase in auto controlled modes #3278
Conversation
ea05a7a
to
aa08bd0
Compare
Awesome, is there an "easy" way to get this flashed. Are there nightly build available somewhere? Or instructions how to build it myself? Not much of a C-wiz myself. |
@FinalFrag I built 1.9.1 with this patch: |
4435ec2
to
7b2ac46
Compare
Is there a specific reason you went with 'anything over 95% should be 100%'? Seems a bit redundant to me. |
I went with 'anything over 95% should be 100%' because 100% throttle should correspond to max thrust and, if you are asking to descent, the "base throttle" will be lowered bellow cruise throttle and otherwise you couldn't get full throttle when asking for it. |
Can't the whole throttle block be simplified to this? You'd get whatever throttle your stick is at as long as it's above the previously corrected value (which includes the lowered throttle on descend). I'm assuming both rcCommand and correctedThrottleValue is 1000-2000 here though, which I may be wrong on.
|
You are right rcCommand and correctedThrottleValue are between 1000-2000. Your code would disable the automatic throttle entirely when not in failsafe. |
Whoops, was just editing my comment to make it even briefer. My code would only "disable" auto-thr (more like overrule) when rcCommand[THROTTLE] > correctedThrottleValue, which is the goal of this issue to my understanding? |
|
Sorry I misread your code |
If the throttle is not enough, that also implies rcCommand[THROTTLE] is no longer above correctedThrottleValue and the auto-thr would get priority and my code would not be executed. E.g. flying level at 1500 auto and requesting 1510 by throttle would give you 1510. |
Right. I read your code a bit too fast. I did like I did because I wanted the throttle to always be automatically adjusted when requested throttle is < 95%. Your code would work but it overrides the automatic throttle when it is above the calculated auto throttle. |
Ah I see where our thought process was different. Not sure which of the 2 is better to follow people around, which was my original reason for the request. I should figure out how to build the code so I can test both approaches. |
The idea of the auto throttle is to keep the air speed constant so to me when it is enabled it should always vary the throttle depending on pitch. In my opinion it is adequate for your use case since it should help you keep a constant speed when pitching up/down but also allow you to vary your speed with the throttle stick. |
Yes, certainly adequate and I appreciate taking the time to make this change and build it for us to use before 1.9.2. Just wondering if you'd be able to "feel" the difference in the air, but yours is in theory the better solution. This is also a better approach than to split alt-hold into 2 features alt-hold and auto-thr as I originally requested. |
7b2ac46
to
792a32f
Compare
Should satisfy #3251 and #1985 at least partially until better air speed functionality.
The idea is to increase the throttle in auto modes by raising the throttle stick above
nav_fw_cruise_thr
. If no increase in throttle is wanted the throttle stick can be left at cruise power for easy transition out of the auto controlled throttle mode. If the throttle is above 95% the motor will be commanded to run atmax_throttle
. The OSD throttle indicator will blink in auto modes when the throttle is manually increased.