1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-26 17:55:24 +03:00

Auto merged - #2866 at Tue, 29 Mar 2022 07:17:07 GMT

Make expert mode permanent even after manually switching it off and reconnecting
This commit is contained in:
J Blackman 2022-03-29 18:17:08 +11:00 committed by GitHub
commit 77cd427c89
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -130,7 +130,7 @@ function initializeSerialBackend() {
$('input.auto_connect, span.auto_connect').prop('title', i18n.getMessage('autoConnectDisabled'));
}
// bind UI hook to auto-connect checkbos
// bind UI hook to auto-connect checkbox
$('input.auto_connect').change(function () {
GUI.auto_connect = $(this).is(':checked');
@ -193,6 +193,12 @@ function finishClose(finishedCallback) {
// reset active sensor indicators
sensor_status(0);
// reset expert mode
ConfigStorage.get('permanentExpertMode', function (result) {
const checked = result.permanentExpertMode;
$('input[name="expertModeCheckbox"]').prop('checked', checked).trigger('change');
});
if (wasConnected) {
// detach listeners and remove element data
$('#content').empty();