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

Tradheli: After landing in Autotune and motor interlock disables, motor can restart #27418

Closed
bnsgeyer opened this issue Jun 29, 2024 · 1 comment
Assignees

Comments

@bnsgeyer
Copy link
Contributor

bnsgeyer commented Jun 29, 2024

Bug report

Issue details
User experienced an unexpected motor restart after landing in Autotune (for heli, motor interlock disables once land complete flag is true). Here is the User's Post on this event

It was determined that Autotune does not handle the spool state similar to other non-manual throttle flight modes that are not intended for takeoff (like Brake mode). For heli's, once the aircraft lands, the spool state is set to GROUND_IDLE. This disables motor interlock in the code while the user's switch still has it enabled.
Here is the lines of code in Mode_Autotune responsible for this behavior
if (target_climb_rate < 0.0f) {
copter.motors->set_desired_spool_state(AP_Motors::DesiredSpoolState::GROUND_IDLE);
} else {
copter.motors->set_desired_spool_state(AP_Motors::DesiredSpoolState::THROTTLE_UNLIMITED);
}

Thus when the user accidentally raised the throttle above center which triggered a positive commanded climb rate, then the motor interlock was enabled again and the motor started.

I will start a PR with the solution that I think will work for multi and heli. Just wanted to document this issue.

Version
ArduCopter 4.5.1

Platform
[ ] All
[ ] AntennaTracker
[X] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Airframe type
Helicopter - Single

Hardware type
CUAV Nora

Logs
Link to relevant log is provided in discuss post

@bnsgeyer
Copy link
Contributor Author

bnsgeyer commented Jul 9, 2024

fixed in PR #27423
closing

@bnsgeyer bnsgeyer closed this as completed Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants