Skip to content

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 the 10.8.0 milestone Mar 22, 2022
@github-actions

This comment has been minimized.

// 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 👍

@sobelek sobelek force-pushed the fix_permament_expert_mode branch from 93d38b6 to a46ff4b Compare March 23, 2022 19:53
@sobelek sobelek requested a review from haslinghuis March 23, 2022 19:53
@sonarqubecloud
Copy link

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.

@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
@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

None yet

Development

Successfully merging this pull request may close these issues.

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

8 participants