-
-
Notifications
You must be signed in to change notification settings - Fork 936
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
Disable motor stop feature when airmode is enabled #4326
Conversation
✅ Deploy Preview for origin-betaflight-app ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
So you are more inclined to have it hidden. Well, if that is a better option compared to have it disabled, then let it be. |
@dmak did not know it was exclusive. So makes sense to hide it in configurator. But still like the info to be in documentation too. |
Well, my idea was that if control is disabled, the user may click on (?) button or navigate to wiki to get more info about why it is disabled. If it is hidden then it rings no bell 😉 |
i can predict many |
Meeeh. cli should also not enable feature when AIRMODE is enabled. EDIT: When using AIRMODE on a switch think both should be allowed exclusive (MOTOR_STOP for start / end of flight and AIRMODE in flight) |
See betaflight/betaflight#14236 EDIT: last change does no longer need changes in firmware. |
386150f
to
9c939bc
Compare
rather that toggling it off, why not CSS? while i did not dig into code, using inspector to find:
why not something similar to (but follow other existing disabled css):
edit: seems var |
the
maybe However, the CSS/Less evades me 1000%. I could not find the correct Maybe @VitroidFPV has some clues. |
I'll have a look at the styles tomorrow, should be doable |
9c939bc
to
45abb57
Compare
my 2c... and it's probably like this already, but I can't check:
|
It indeed like so at this moment. However, I proposed that the motor-stop switch still reflect actual CLI value. i.e. can be |
Approving, possible to merge if satisfactory |
|
post-merge -- perfect |
Yeah CSS is magic. Still cannot grasp @VitroidFPV solution needs the extra switchery class in But guess this is an override. Was trying addClass and removeClass for switchery-disabled and switchery-default in which did not work. |
This pull request includes changes to the
locales/en/messages.json
,src/js/Features.js
, andsrc/js/tabs/motors.js
files to enhance the functionality and user interface related to the MOTOR_STOP feature. The most important changes include adding a tip message for the MOTOR_STOP feature, updating the feature configuration to include the tip, and modifying the motor initialization logic to handle the MOTOR_STOP feature based on the AIRMODE status.Enhancements to MOTOR_STOP feature:
locales/en/messages.json
: Added a new message for the MOTOR_STOP feature tip, indicating that the feature is disabled when AIRMODE is enabled.src/js/Features.js
: Updated the MOTOR_STOP feature configuration to include ahaveTip
attribute, enabling the display of the tip message.src/js/tabs/motors.js
: Modified the motor initialization logic to check the status of MOTOR_STOP and AIRMODE, ensuring the MOTOR_STOP feature is only enabled when AIRMODE is disabled.