Skip to content
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

plane: restore thr_min behavior #11059

Merged
merged 1 commit into from
Apr 22, 2019
Merged

Conversation

IamPete1
Copy link
Member

@IamPete1 IamPete1 commented Apr 9, 2019

fix for #11030

This now constrains throttle to between thr_min and thr_max in FBWA/SATABILIZE ect. I couldn't track down how this was done before. Possibly the throttle was interpolated to between thr_min and thr_max? This currently just constrains so some throttle bellow thr_min has no change.

@IamPete1
Copy link
Member Author

IamPete1 commented Apr 9, 2019

The throttle was originaly constrained so the fix is correct

@Jaaaky
Copy link
Contributor

Jaaaky commented Apr 10, 2019

It was constrained previously unless throttle_passthru_stabilize is set.
If throttle_passthru_stabilize is set, it works like manual.

@Jaaaky
Copy link
Contributor

Jaaaky commented Apr 12, 2019

I've added one more related problem in the original bug report;
#11030 (comment)

I think those 3 lines here

SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, 0);

Should be changed as follows;

            SRV_Channels::set_output_scaled(SRV_Channel::k_throttle, min_throttle);
            SRV_Channels::set_output_scaled(SRV_Channel::k_throttleLeft, min_throttle);
            SRV_Channels::set_output_scaled(SRV_Channel::k_throttleRight, min_throttle);

@IamPete1
Copy link
Member Author

IamPete1 commented Apr 12, 2019

This now also outputs throttle min when disarmed as per ARMING_REQUIRE description. This is abit odd tho so now THR_MIN is respected when disarmed and in all modes except manual. I wonder if we would be better moving THR_MIN over to the ICE library for this use case (ie idling with THR_MIN). It seems that THR_MIN when disarmed may have been broken for some time and it now has the dual purpose of enabling the reverse thrust stuff.

@DavidIngraham
Copy link
Contributor

I think that the parameter description is broken at this point. It would be very dangerous to change this behavior now to make it output throttle_min when disarmed. I can't think of a use case where it would be useful for it to do that, even with an ICE engine.

@IamPete1
Copy link
Member Author

@DavidIngraham Yeah I think I agree, thr_min should be for armed only and a new parameter linked to the ignition switch functionality should be set up in the ICE library.

@IamPete1
Copy link
Member Author

I think we should either remove the arming require thr_min option and replace it with #11109 in the ICE lib (this also gives added functionality of having engine start and stop on a switch) and/or fix the behavior here but change the default to arming require zero throttle.

@DavidIngraham
Copy link
Contributor

DavidIngraham commented Apr 15, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants