Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorPawel Spychalski (DzikuVx) <pspychalski@gmail.com>2020-05-09 15:28:57 +0300
committerPawel Spychalski (DzikuVx) <pspychalski@gmail.com>2020-05-09 15:28:57 +0300
commit596a7962578fbdd6d1d5014d7df7046ac17b3f04 (patch)
tree019a739c1deb8aaf82d6c203f3f7138a7565ae98 /js
parentcb6e948c5436171870a2f28705f67cdad38be677 (diff)
Do not reboot on applying old defaults
Diffstat (limited to 'js')
-rw-r--r--js/defaults_dialog.js19
1 files changed, 13 insertions, 6 deletions
diff --git a/js/defaults_dialog.js b/js/defaults_dialog.js
index eff60c3e..01ba33f9 100644
--- a/js/defaults_dialog.js
+++ b/js/defaults_dialog.js
@@ -13,6 +13,7 @@ helper.defaultsDialog = (function() {
let data = [{
"title": 'Mini Quad with 3"-7" propellers',
"notRecommended": false,
+ "reboot": true,
"settings": [
/*
System
@@ -175,6 +176,7 @@ helper.defaultsDialog = (function() {
"title": 'Airplane',
"notRecommended": false,
"id": 3,
+ "reboot": true,
"settings": [
{
key: "rc_yaw_expo",
@@ -219,6 +221,7 @@ helper.defaultsDialog = (function() {
{
"title": 'Rovers & Boats',
"notRecommended": false,
+ "reboot": true,
"settings": [
{
key: "applied_defaults",
@@ -265,6 +268,7 @@ helper.defaultsDialog = (function() {
{
"title": 'Custom UAV - INAV legacy defaults (Not recommended)',
"notRecommended": true,
+ "reboot": false,
"settings": [
{
key: "applied_defaults",
@@ -275,6 +279,7 @@ helper.defaultsDialog = (function() {
{
"title": 'Keep current settings (Not recommended)',
"notRecommended": true,
+ "reboot": false,
"settings": [
{
key: "applied_defaults",
@@ -323,13 +328,15 @@ helper.defaultsDialog = (function() {
//noinspection JSUnresolvedVariable
GUI.log(chrome.i18n.getMessage('configurationEepromSaved'));
- GUI.tab_switch_cleanup(function() {
- MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () {
- //noinspection JSUnresolvedVariable
- GUI.log(chrome.i18n.getMessage('deviceRebooting'));
- GUI.handleReconnect();
+ if (selectedDefaultPreset.reboot) {
+ GUI.tab_switch_cleanup(function() {
+ MSP.send_message(MSPCodes.MSP_SET_REBOOT, false, false, function () {
+ //noinspection JSUnresolvedVariable
+ GUI.log(chrome.i18n.getMessage('deviceRebooting'));
+ GUI.handleReconnect();
+ });
});
- });
+ }
});
})
});