-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Improve features (+ cli) #13494
Improve features (+ cli) #13494
Conversation
Use designated initializers for used features. NULL values are stored in gaps. Use ARRAYLEN() for featureNames iteration Use `unsigned` for bitmasks
bitmask of features that are supported in current build configuration. Copied from init.c sanitization
featuresSupportedByBuild makes things much easier
- refuse all features that are not compiled in - AlreadyDisabled/AlreadyEnabled info - refuse operation if multiple features match
Do you want to test this code? You can flash it directly from Betaflight Configurator:
WARNING: It may be unstable. Use only for testing! |
the command |
In case of unavailable might have to split in all features - with a list of unavailable features on a second row. |
Problem is that it needs more parsing of Currently all are returned, for backward compatibility. New commit splits features on two lines, each with header (even code parsing 'Available:' shall work, with limited feature list |
When this PR is open - is it worth supporting |
this would make the diff and dump interesting... I like the idea, but it might be more complicated than the potential value it would deliver. |
|
@ledvinap , i do not mind listing unsupported in also, maybe |
The available list is in the configurator. I think it best if the firmware only reports on the features built into it. |
@ledvinap please rebase |
Co-authored-by: Mark Haslinghuis <mark@numloq.nl>
I did try to follow old behavior - it did print all features, compiled-in or not. I started this PR because I struggled with some feature (maybe SOFTSERIAL, nut I'm not sure) that was not enabled in cloud build. It took some time before I realized it. |
i like the
IMHO |
@nerdCopter : Enabled / Available / Unavailable ? Maybe I can even add features that got automatically disabled (since last reboot only) |
FEATURE_DASHBOARD | FEATURE_LED_STRIP | FEATURE_OSD | FEATURE_RANGEFINDER | ||
| FEATURE_CHANNEL_FORWARDING | FEATURE_SERVO_TILT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think these are most common, the other ones should be enabled manually
FEATURE_DASHBOARD | FEATURE_LED_STRIP | FEATURE_OSD | FEATURE_RANGEFINDER | |
| FEATURE_CHANNEL_FORWARDING | FEATURE_SERVO_TILT | |
FEATURE_LED_STRIP | FEATURE_OSD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@haslinghuis : I tried to avoid changing behavior of code where not necessary. We can easily change defaults in separate PR, probably together with target defaults
|
Description in commits.
654b658 needs some discussion:
feature list
returns all known features. Maybe return only features that are available in firmware? Or mark unavailable ones (!GPS
)?