1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-26 01:35:23 +03:00

Merge branch 'master' into HDZeroVTX

This commit is contained in:
Geoff Sim 2021-12-13 21:56:48 +00:00
commit 7a29908db3
4 changed files with 54 additions and 0 deletions

View file

@ -2,6 +2,7 @@
'use strict';
var helper = helper || {};
var savingDefaultsModal;
helper.defaultsDialog = (function () {
@ -329,6 +330,10 @@ helper.defaultsDialog = (function () {
key: "fw_i_yaw",
value: 0
},
{
key: "fw_d_yaw",
value: 0
},
{
key: "fw_ff_yaw",
value: 100
@ -503,10 +508,30 @@ helper.defaultsDialog = (function () {
key: "fw_i_roll",
value: 3
},
{
key: "fw_d_roll",
value: 7
},
{
key: "fw_ff_roll",
value: 50
},
{
key: "fw_p_yaw",
value: 20
},
{
key: "fw_i_yaw",
value: 0
},
{
key: "fw_d_yaw",
value: 0
},
{
key: "fw_ff_yaw",
value: 100
},
{
key: "imu_acc_ignore_rate",
value: 9
@ -670,6 +695,7 @@ helper.defaultsDialog = (function () {
GUI.tab_switch_cleanup(function () {
MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () {
//noinspection JSUnresolvedVariable
savingDefaultsModal.close();
GUI.log(chrome.i18n.getMessage('deviceRebooting'));
GUI.handleReconnect();
});
@ -681,13 +707,25 @@ helper.defaultsDialog = (function () {
};
privateScope.onPresetClick = function (event) {
savingDefaultsModal = new jBox('Modal', {
width: 400,
height: 100,
animation: false,
closeOnClick: false,
closeOnEsc: false,
content: $('#modal-saving-defaults')
}).open();
$container.hide();
let selectedDefaultPreset = data[$(event.currentTarget).data("index")];
if (selectedDefaultPreset && selectedDefaultPreset.settings) {
mspHelper.loadBfConfig(function () {
privateScope.setFeaturesBits(selectedDefaultPreset)
});
} else {
savingDefaultsModal.close();
}
};