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

Add support for 32 motors, including dodecahexa-octa (two-layers of 8 motors each) #29020

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

peterbarker
Copy link
Contributor

This PR is a mashup of two other PRs which conflicted with one another.

tridge's PR (#27598) added 32-rotor support and a half-baked "m32" SITL frame to test it. I've completed the work on the 32-motor demo frame.

@muramura 's PR (#21157) added support for the 16-motor decahexa frame. It also modified ArduPilot to support 16 motors, which was a subset of tridge's 32-motor support, 'though remembered to patch AP_Periph to match the rest of ArduPilot.

I've reworked both sets of patches significantly to create this combined set, notably trying to bring consistency to the naming of files and frames.

Replaces #21157
Replaces #27598

Both new frames are flown in our "FlyEachFrame" test successfully.

@peterbarker peterbarker force-pushed the pr/muramura/AP_Support_HexadecaOcta_OCTA_X16 branch from b4e4c88 to 4b2cdc7 Compare January 8, 2025 05:24
@peterbarker
Copy link
Contributor Author

I've removed a patch which did this:

@@ -355,7 +355,7 @@ SRV_Channels::SRV_Channels(void)
 #if NUM_SERVO_CHANNELS > 16
         if (i >= 16) {
             // default to GPIO, this disables the pin and stops logging
-            channels[i].function.set_default(SRV_Channel::k_GPIO);
+            channels[i].function.set_default(SRV_Channel::k_none);
         }
 #endif
     }

.... it was killing various autotests.

@amilcarlucas
Copy link
Contributor

Binary Name      Text [B]         Data [B]     BSS (B)        Total Flash Change [B] (%)      Flash Free After PR (B)
---------------  ---------------  -----------  -------------  ----------------------------  -------------------------
arducopter-heli  -268 (-0.0147%)  0 (0.0000%)  4 (+0.0015%)   -268 (-0.0147%)                                  138324
antennatracker   124 (+0.0092%)   0 (0.0000%)  -4 (-0.0015%)  124 (+0.0092%)                                   615828
arducopter       216 (+0.0118%)   0 (0.0000%)  0 (0.0000%)    216 (+0.0118%)                                   136212
ardurover        184 (+0.0110%)   0 (0.0000%)  0 (0.0000%)    184 (+0.0110%)                                   292980
arduplane        196 (+0.0108%)   0 (0.0000%)  4 (+0.0015%)   196 (+0.0108%)                                   150148
blimp            124 (+0.0090%)   0 (0.0000%)  -4 (-0.0015%)  124 (+0.0090%)                                   593480
ardusub          516 (+0.0320%)   0 (0.0000%)  -4 (-0.0015%)  516 (+0.0319%)                                   348512

tridge and others added 22 commits January 9, 2025 09:24
a stack of 8 X quad frames
this allows MotorMatrix to change a channel's default (and value) from k_GPIO to a motor output value.

The loop in the SRV_Channels contructors sets all defaults for channels above 16 to GPIO, and this code stopped MotorsMatrix from assigning a different role the the output.
@peterbarker peterbarker force-pushed the pr/muramura/AP_Support_HexadecaOcta_OCTA_X16 branch from 4b2cdc7 to 77bdea9 Compare January 8, 2025 23:24
@peterbarker
Copy link
Contributor Author

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeOrange-periph-heavy  24                                                                    
CubeRedPrimary                      40     *           88      40                48     56     216
Durandal                            120    *           232     -272              216    200    536
Hitec-Airspeed           *                                                                     
KakuteH7-bdshot                     16     *           64      16                24     32     120
MatekF405                           16     *           48      40                48     32     240
Pixhawk1-1M-bdshot                  16                 48      48                48     40     304
bebop                               4096               -12400  0                 -8336  0      -16576
f103-QiotekPeriph        *                                                                     
f303-Universal           *                                                                     
iomcu                                                                *                         
revo-mini                           16     *           48      48                56     40     104
skyviper-v2450                                         40                                      

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

Successfully merging this pull request may close these issues.

4 participants