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

Parachute: relay pram conversion does not work if chute is disabled. #26132

Closed
IamPete1 opened this issue Feb 2, 2024 · 3 comments
Closed

Parachute: relay pram conversion does not work if chute is disabled. #26132

IamPete1 opened this issue Feb 2, 2024 · 3 comments
Labels

Comments

@IamPete1
Copy link
Member

IamPete1 commented Feb 2, 2024

#25108 moved us from numbered relays set in libraries to relay functions. In this process param conversion was added to enable the correct functions automatically. However, that function assumes that the parachute lib must be enabled to work. However as discovered in #26128 (comment) its perfectly possible to have the chute disabled yet have the chute still deploy.

This is where enabled is checked in the param conversion:

if (!enabled() || (_release_type > AP_PARACHUTE_TRIGGER_TYPE_RELAY_3)) {

We can't just remove the enable check because then relay 0 on every board would get set to parachute because its the default type. This would override any other functionality that could be using the pin. There is a pre-arm, but again it will only warn about no relay if chute is enabled.....

So a user could have working setup with the parachute enable param set to 0, a mission or switch can be used to set enable param to 1 at run time and deploy the chute. They update and will not get the param conversion or pre-arm so there will be no relay, and there chute will not deploy.

@IamPete1
Copy link
Member Author

IamPete1 commented Feb 2, 2024

One way that would fix, but would also be very annoying would be to move the index of the enable param and defualt to enabled. This would mean chute becomes enabled for everyone. That would mean everyone would hit the pre-arm for having no relay or servo function setup and force them either setup up the relay manually or disable the chute lib.

@IamPete1
Copy link
Member Author

IamPete1 commented Feb 2, 2024

We could make chute fire off the numbered relay from the old CHUTE_TYPE scheme if no relay is setup with the parachute function. That would maintain the current behaviour (although it does undermine our move to relay functions slightly) because it was possible to have several things using the same relay numbers this means we would have to override whatever function is using that relay.

@CraigElder CraigElder changed the title Parachute: relay pram conversion does not work if chute is diabled. Parachute: relay pram conversion does not work if chute is disabled. Feb 6, 2024
@IamPete1
Copy link
Member Author

Resolved by #26151

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

No branches or pull requests

2 participants