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

Make expert mode permanent even after manually switching it off and reconnecting #2866

Merged
merged 2 commits into from
Mar 29, 2022

Conversation

sobelek
Copy link
Contributor

@sobelek sobelek commented Mar 22, 2022

Hey.
This PR Fixes #2610
If you see any other possibility of implementing this please let me know and lets talk about it.

This is my first commit to this codebase so if I missed anything process related let me know.

@haslinghuis haslinghuis added this to Bug Tracker in Finalizing Firmware 4.3 Release via automation Mar 22, 2022
@haslinghuis haslinghuis added this to the 10.8.0 milestone Mar 22, 2022
@github-actions

This comment has been minimized.

@haslinghuis haslinghuis moved this from Bug Tracker to Configurator in Finalizing Firmware 4.3 Release Mar 22, 2022
// reset expert mode
ConfigStorage.get('permanentExpertMode', function (result) {
const checked = result.permanentExpertMode;
$('input[name="expertModeCheckbox"]').prop('checked', checked).change();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the new syntax:

Suggested change
$('input[name="expertModeCheckbox"]').prop('checked', checked).change();
$('input[name="expertModeCheckbox"]').prop('checked', checked).trigger('change');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, didn't know that
Done 👍

@sonarcloud
Copy link

sonarcloud bot commented Mar 23, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

Do you want to test this code? Here you have an automated build:
Betaflight-Configurator-Debug-Android
Betaflight-Configurator-Debug-Linux
Betaflight-Configurator-Debug-macOS
Betaflight-Configurator-Debug-Windows
WARNING: It may be unstable and result in corrupted configurations or data loss. Use only for testing!

@mrRobot62
Copy link

tested on latest build - works as requested - Bug/Request fixed

@haslinghuis haslinghuis self-assigned this Mar 23, 2022
Comment on lines +197 to +200
ConfigStorage.get('permanentExpertMode', function (result) {
const checked = result.permanentExpertMode;
$('input[name="expertModeCheckbox"]').prop('checked', checked).trigger('change');
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is not need to use callback syntax now (we should drop that completely...)

Suggested change
ConfigStorage.get('permanentExpertMode', function (result) {
const checked = result.permanentExpertMode;
$('input[name="expertModeCheckbox"]').prop('checked', checked).trigger('change');
});
const result = ConfigStorage.get('permanentExpertMode');
const checked = result.permanentExpertMode;
$('input[name="expertModeCheckbox"]').prop('checked', checked).trigger('change');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chmelevskij will be fixed in #2636

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, though that one is in already.... soz

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But wait a minute, master already supports sync access, so wouldn't it be better to just go with the correct usage?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Finalizing Firmware 4.3 Release automation moved this from Configurator to Firmware Mar 29, 2022
@blckmn
Copy link
Member

blckmn commented Mar 29, 2022

AUTOMERGE: (PASS)

  • github identifies PR as mergeable -> PASS
  • assigned to a milestone -> PASS
  • cooling off period lapsed -> PASS
  • commit count less or equal to three -> PASS
  • Don't merge label NOT found -> PASS
  • at least one RN: label found -> PASS
  • Tested label found -> PASS
  • assigned to an approver -> PASS
  • approver count at least three -> PASS

@blckmn blckmn merged commit 77cd427 into betaflight:master Mar 29, 2022
Finalizing Firmware 4.3 Release automation moved this from Firmware to Finished (Merged) Mar 29, 2022
@limonspb
Copy link
Member

limonspb commented Apr 1, 2022

I don't see how, I think this one introduced the bug (at least on windows). On presets tab save/load backup buttons don't act normal. At the end they need to restart the configurator page and FC, but they don't anymore.

I can check what's happening only in a few days. Now I just tested nightly builds to see where the issue started: e62ab2d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Option "Permanently activate expert mode" works only if BF-Configurator is restarted
8 participants