-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Reducing the minumum mmix number of motors for the warning to appear in the "Custom Airplane" mixer #4319
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for origin-betaflight-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@limonspb , can you verify and give insight. Does the code require 2, or just the configurator? |
@nerdCopter see https://github.com/betaflight/betaflight/blob/c2768d0409a6dd6487bc88a0952079e3048ba43a/src/main/flight/mixer_init.c#L242-L274 (when one motor is required could use |
i see 2 for custom-airplane, but 0 for custom (which also has false for servo by default)
so i presume there could be a workaround by using CUSTOM, but adding USE_WING & USER_SERVOS in cloud-build. |
I had the following idea in my head: if there is a CUSTOM mode, in which by default there is nothing mapped (no motors, no servos), then the logic of CUSTOM_AIRPLANE mode should be as close as possible to CUSTOM mode with a bias towards airplanes/wings - the predefined servos (and, optionally, at least one motor). |
Oh thats a good one, i always had to assign motor 2 to something that doesn't exist. But was always curious if that's FW or Configurator requirement. @hntirgeam could you plz check that you can still arm with one motor? And check if you still can have 2+ motors and still spin them on the motors tab. I'd be OK that @nerdCopter |
@limon no need to adjust the model nor the function isFixedWing as it already accounts for MIXER_FLYING_WING, MIXER_AIRPLANE and MIXER_CUSTOM_AIRPLANE)
|
8e1af55
to
4752d69
Compare
@limonspb, changed motors count from 1 to 0 to match CUSTOM mixer. I also just flashed a fresh dev build and can confirm that both combinations can be armed and controlled on the motors tab via the UI: # mixer
Mixer: CUSTOMAIRPLANE
# mmix
mmix 0 1.000 0.000 0.000 0.000 # mixer
Mixer: CUSTOMAIRPLANE
# mmix
mmix 0 1.000 0.000 0.000 0.000
mmix 1 1.000 0.000 0.000 0.000
mmix 2 1.000 0.000 0.000 0.000 Can't really tell if changing anything in FC code is necessary - comment says modes needs to be synced, but I've also found comment that says that mixes are loaded dynamically by configurator: |
Quality Gate passedIssues Measures |
I have discovered that the betaflight configurator gives a warning that I need to define 2+ motors in the “Custom Airplane” mixer mode.
I don't think this is expected behavior, because “Custom Airplane” can sometimes have no motors at all (gliders). Given that this case is very rare, it seems to me that the number of expected motors for this mode should be set to 1, not 2.
(perhaps 0 would even be a better choice, given the fact that in “Custom Airplane” you have to define mmix/smix yourself anyway)
The earliest commit defining 2 minimum motors can be found here: 6b3db9e