mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-15 12:25:13 +03:00
CLI available for old firmware versions
This commit is contained in:
parent
0c6b55d070
commit
32a27b73a7
5 changed files with 13 additions and 3 deletions
|
@ -103,7 +103,7 @@
|
||||||
"message": "No configuration received within <span style=\"color: red\">10 seconds</span>, communication <span style=\"color: red\">failed</span>"
|
"message": "No configuration received within <span style=\"color: red\">10 seconds</span>, communication <span style=\"color: red\">failed</span>"
|
||||||
},
|
},
|
||||||
"firmwareVersionNotSupported": {
|
"firmwareVersionNotSupported": {
|
||||||
"message": "This firmware version is <span style=\"color: red\">not supported</span>. Please upgrade to firmware that supports api version <strong>$1</strong> or higher"
|
"message": "This firmware version is <span style=\"color: red\">not supported</span>. Please upgrade to firmware that supports api version <strong>$1</strong> or higher. Only CLI is usable for backup purposes."
|
||||||
},
|
},
|
||||||
"firmwareVersion": {
|
"firmwareVersion": {
|
||||||
"message": "Firmware Version: <strong>$1</strong>"
|
"message": "Firmware Version: <strong>$1</strong>"
|
||||||
|
|
0
eventPage.js
Normal file → Executable file
0
eventPage.js
Normal file → Executable file
1
js/data_storage.js
Normal file → Executable file
1
js/data_storage.js
Normal file → Executable file
|
@ -5,6 +5,7 @@ var CONFIGURATOR = {
|
||||||
'apiVersionAccepted': 1.1,
|
'apiVersionAccepted': 1.1,
|
||||||
'backupFileMinVersionAccepted': '0.55', // chrome.runtime.getManifest().version is stored as string, so does this one
|
'backupFileMinVersionAccepted': '0.55', // chrome.runtime.getManifest().version is stored as string, so does this one
|
||||||
'connectionValid': false,
|
'connectionValid': false,
|
||||||
|
'connectionValidCliOnly': false,
|
||||||
'cliActive': false,
|
'cliActive': false,
|
||||||
'cliValid': false
|
'cliValid': false
|
||||||
};
|
};
|
||||||
|
|
7
js/serial_backend.js
Normal file → Executable file
7
js/serial_backend.js
Normal file → Executable file
|
@ -27,6 +27,7 @@ $(document).ready(function () {
|
||||||
|
|
||||||
GUI.connected_to = false;
|
GUI.connected_to = false;
|
||||||
CONFIGURATOR.connectionValid = false;
|
CONFIGURATOR.connectionValid = false;
|
||||||
|
CONFIGURATOR.connectionValidCliOnly = false;
|
||||||
MSP.disconnect_cleanup();
|
MSP.disconnect_cleanup();
|
||||||
PortUsage.reset();
|
PortUsage.reset();
|
||||||
|
|
||||||
|
@ -177,7 +178,11 @@ function onOpen(openInfo) {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareVersionNotSupported', [CONFIGURATOR.apiVersionAccepted]));
|
GUI.log(chrome.i18n.getMessage('firmwareVersionNotSupported', [CONFIGURATOR.apiVersionAccepted]));
|
||||||
$('div#port-picker a.connect').click(); // disconnect
|
CONFIGURATOR.connectionValid = true; // making it possible to open the CLI tab
|
||||||
|
$('div#port-picker a.connect').text(chrome.i18n.getMessage('disconnect')).addClass('active');
|
||||||
|
$('#tabs li a:last').click(); // open CLI tab
|
||||||
|
GUI.timeout_remove('connecting'); // kill connecting timer
|
||||||
|
CONFIGURATOR.connectionValidCliOnly = true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
6
main.js
Normal file → Executable file
6
main.js
Normal file → Executable file
|
@ -62,12 +62,16 @@ $(document).ready(function () {
|
||||||
var self = this,
|
var self = this,
|
||||||
tab = $(self).parent().prop('class');
|
tab = $(self).parent().prop('class');
|
||||||
|
|
||||||
// if there is no active connection, return
|
|
||||||
if (!CONFIGURATOR.connectionValid) {
|
if (!CONFIGURATOR.connectionValid) {
|
||||||
GUI.log('You need to <strong>connect</strong> before you can view any of the tabs');
|
GUI.log('You need to <strong>connect</strong> before you can view any of the tabs');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (CONFIGURATOR.connectionValidCliOnly) {
|
||||||
|
GUI.log('You need to <strong>Upgrade</strong> your firmware before you can view any of the tabs');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
GUI.tab_switch_in_progress = true;
|
GUI.tab_switch_in_progress = true;
|
||||||
|
|
||||||
GUI.tab_switch_cleanup(function () {
|
GUI.tab_switch_cleanup(function () {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue