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

Fix ESCs constantly arming on rover with dshot commands #20374

Merged
merged 3 commits into from
Mar 28, 2022

Conversation

andyp1per
Copy link
Collaborator

@andyp1per andyp1per commented Mar 25, 2022

Several bugs fixed:

  • ESCs constantly arming on rover with dshot commands
  • Bdshot not working with fewer channels than the full group
  • Not disabling disabled channels
  • Not pulling high all channels in a bdshot group (caused random motor movements in disabled channels)
  • Not ignoring disabled channels for telemetry starting position

Although this affects all vehicles it will particularly help rover and plane

@andyp1per
Copy link
Collaborator Author

@rmackay9 this appears to fix all of the bugs as far as I can tell including LED output.

@rmackay9
Copy link
Contributor

rmackay9 commented Mar 26, 2022

I've tested this on a pixracer and CubeOrange (using the special bdshot firmware for Rover) and confirmed that the motor spins correctly and I'm able to get RPM from the ESC using bi-directional DSHOT but only when the throttle is on the first fmu channel. The motor does not spin if the throttle is on the 2nd FMU channel.
image

If I used this PR's code with bdshot disabled it all worked OK even on the 2nd channel.

With master and BDshot enabled the ESC do not arm reliably and when they do they are often followed by some pretty scary motor movements.

@andyp1per andyp1per force-pushed the pr-rover-bdshot-3d branch 2 times, most recently from 128cf20 to 95f102c Compare March 26, 2022 19:51
@andyp1per
Copy link
Collaborator Author

Thanks @rmackay9 should be fixed now. There were actually two remaining bugs, both of which were extremely subtle.

make sure debug will compile
take into account active channels when configuring bdshot
add channel mask debug output
correct set bdshot telemetry position at startup
make sure all channels in a bdshot group are pulled high to prevent spurious pulses
unilaterally write rcoutput to appease the sitl gods
@andyp1per
Copy link
Collaborator Author

Flown on a miniquad without issue - bi-directional dshot all ok.

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested this and it resolves the issues I was seeing on Rover, thanks very much!

@rmackay9 rmackay9 mentioned this pull request Mar 28, 2022
60 tasks
@peterbarker peterbarker merged commit 63229d7 into ArduPilot:master Mar 28, 2022
@andyp1per andyp1per deleted the pr-rover-bdshot-3d branch March 29, 2022 07:35
@rmackay9 rmackay9 added this to Pending in Copter 4.2 Mar 29, 2022
@rmackay9
Copy link
Contributor

This has been added to Copter-4.2.0-beta3

@rmackay9 rmackay9 moved this from Pending to 4.2.0-beta3 in Copter 4.2 Mar 29, 2022
@tridge tridge added this to pending in Plane 4.2 Apr 5, 2022
@tridge tridge moved this from pending to merged in Plane 4.2 Apr 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Copter 4.2
4.2.0-beta3
Development

Successfully merging this pull request may close these issues.

None yet

4 participants