mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-20 23:05:13 +03:00
Revert "Reset PIDs button to use applied defaults"
This commit is contained in:
parent
8ee0836f2b
commit
2c8f32890f
5 changed files with 166 additions and 379 deletions
|
@ -49,9 +49,6 @@
|
|||
"savingDefaults": {
|
||||
"message": "Device - <span style=\"color: red\">Saving default settings</span>"
|
||||
},
|
||||
"resettingPIDs": {
|
||||
"message": "Device - <span style=\"color: red\">Resetting PID & related settings</span>"
|
||||
},
|
||||
"fcNotConnected": {
|
||||
"message": "Not connected"
|
||||
},
|
||||
|
@ -3886,7 +3883,7 @@
|
|||
"message": "This will allow to select new default values for all settings. Existing PID tune and other settings might be lost!\nDo you want to continue?"
|
||||
},
|
||||
"confirm_reset_pid": {
|
||||
"message": "This will reset all PID settings for the current profile to platform default values and save.\nDo you want to continue?"
|
||||
"message": "This will reset all PID settings to firmware default values and save.\nDo you want to continue?"
|
||||
},
|
||||
"mappingTableOutput": {
|
||||
"message": "Output"
|
||||
|
|
File diff suppressed because it is too large
Load diff
4
main.css
4
main.css
|
@ -2163,13 +2163,13 @@ select {
|
|||
text-align: center;
|
||||
}
|
||||
|
||||
#modal-saving-defaults, #modal-resetting-pids {
|
||||
#modal-saving-defaults {
|
||||
/* width: 100%; */
|
||||
height: 90px;
|
||||
background: url(../images/loading-bars.svg) no-repeat center 100%;
|
||||
}
|
||||
|
||||
#modal-saving-defaults div, #modal-resetting-pids div {
|
||||
#modal-saving-defaults div {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
|
|
@ -301,9 +301,6 @@
|
|||
<div id="modal-saving-defaults" class="is-hidden">
|
||||
<div data-i18n="savingDefaults"></div>
|
||||
</div>
|
||||
<div id="modal-resetting-pids" class="is-hidden">
|
||||
<div data-i18n="resettingPIDs"></div>
|
||||
</div>
|
||||
<div id="defaults-wrapper" style="display: none">
|
||||
<div class="defaults-dialog__background"></div>
|
||||
<div class="defaults-dialog__content">
|
||||
|
|
|
@ -93,7 +93,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
RC_tuning.manual_pitch_rate = $('#rate-manual-pitch').val();
|
||||
RC_tuning.manual_yaw_rate = $('#rate-manual-yaw').val();
|
||||
}
|
||||
|
||||
function hideUnusedPids(sensors_detected) {
|
||||
$('.tab-pid_tuning table.pid_tuning').hide();
|
||||
$('#pid_main').show();
|
||||
|
@ -114,7 +113,6 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
$('#pid_baro').show();
|
||||
}
|
||||
}
|
||||
|
||||
function process_html() {
|
||||
// translate to user-selected language
|
||||
localize();
|
||||
|
@ -137,24 +135,16 @@ TABS.pid_tuning.initialize = function (callback) {
|
|||
});
|
||||
|
||||
$('#resetPIDs').on('click', function() {
|
||||
if (confirm(chrome.i18n.getMessage('confirm_reset_pid'))) {
|
||||
resettingPIDsModal = new jBox('Modal', {
|
||||
width: 400,
|
||||
height: 100,
|
||||
animation: false,
|
||||
closeOnClick: false,
|
||||
closeOnEsc: false,
|
||||
content: $('#modal-resetting-pids')
|
||||
}).open();
|
||||
|
||||
helper.defaultsDialog.resetSettings();
|
||||
if (confirm(chrome.i18n.getMessage('confirm_reset_pid'))) {
|
||||
MSP.send_message(MSPCodes.MSP_SET_RESET_CURR_PID, false, false, false);
|
||||
updateActivatedTab();
|
||||
}
|
||||
});
|
||||
|
||||
$('#resetDefaults').on('click', function() {
|
||||
|
||||
if (confirm(chrome.i18n.getMessage('confirm_select_defaults'))) {
|
||||
helper.features.reset();
|
||||
helper.features.fromUI($('.tab-pid_tuning'));
|
||||
mspHelper.setSetting("applied_defaults", 0, function() {
|
||||
mspHelper.saveToEeprom( function () {
|
||||
GUI.log(chrome.i18n.getMessage('configurationEepromSaved'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue