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

AP_IOMCU: allow up to 16 channels of servo data to be sent to the iomcu #26898

Merged
merged 2 commits into from
Apr 30, 2024

Conversation

andyp1per
Copy link
Collaborator

Fixes #26851

@andyp1per
Copy link
Collaborator Author

andyp1per commented Apr 27, 2024

4.5.0beta3 using dshot without the whole SBUS change:

image

With the SBUS change
image

So losing 128 bytes of memory and 48 bytes of stack

@rmackay9
Copy link
Contributor

yay! Thanks so much for this!

@tridge
Copy link
Contributor

tridge commented Apr 30, 2024

@rmackay9 will test

@tridge
Copy link
Contributor

tridge commented Apr 30, 2024

we need to work out where the duplicates on chan13 came from, maybe gdb on IOMCU looking in SBUS out function to see where it got the value from. Concern is this is a crash bug

@rmackay9
Copy link
Contributor

I've confirmed that this fixes the most recent issue we've seen with the SBUS output.

So to re-iterate the testing procedure, I setup two CubeOrangePluses where the 1st autopilot's SBUS output was connected to the 2nd autopilot's RCIN.

Below is a screen shot of the 1st autopilot's servo output and we can see that it is copying RCIN 6 to four output channels.
image

Then on the 2nd autopilot we can see that the correct PWMs are appearing as SBUS input.
image

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.

This looks OK to me and I've tested this resolves the issue, thanks!

@rmackay9
Copy link
Contributor

rmackay9 commented Apr 30, 2024

@andyp1per,

After this change there is just a single use of IOMCU_MAX_CHANNELS on line 1152 of iofirmware.cpp. I'm just guessing but should that line also be changed?

@andyp1per
Copy link
Collaborator Author

After this change there is just a single use of IOMCU_MAX_CHANNELS on line 1152 of iofirmware.cpp. I'm just guessing but should that line also be changed?

No, that one is correct

@tridge tridge merged commit 34827a0 into ArduPilot:master Apr 30, 2024
91 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 4.5.2-beta1
Development

Successfully merging this pull request may close these issues.

SBus Output missing for channel 9 ~ 16
4 participants