ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

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

Open andyp1per opened this issue 9 months ago • 2 comments

Fixes https://github.com/ArduPilot/ardupilot/issues/26851

andyp1per avatar Apr 27 '24 07:04 andyp1per

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

andyp1per avatar Apr 27 '24 08:04 andyp1per

yay! Thanks so much for this!

rmackay9 avatar Apr 27 '24 11:04 rmackay9

@rmackay9 will test

tridge avatar Apr 30 '24 00:04 tridge

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

tridge avatar Apr 30 '24 00:04 tridge

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

rmackay9 avatar Apr 30 '24 06:04 rmackay9

@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?

rmackay9 avatar Apr 30 '24 06:04 rmackay9

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

andyp1per avatar Apr 30 '24 07:04 andyp1per