mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-23 00:05:19 +03:00
Set min and max supported firmware
This commit is contained in:
parent
7bc94e130a
commit
61189e4d6c
3 changed files with 5 additions and 4 deletions
|
@ -159,7 +159,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. Use CLI for backup before flashing. CLI backup/restore procedure is in the documention."
|
"message": "This firmware version is <span style=\"color: red\">not supported</span>. This version of Configurator supports firmware from $1 to $2 (excluded)"
|
||||||
},
|
},
|
||||||
"firmwareVariantNotSupported": {
|
"firmwareVariantNotSupported": {
|
||||||
"message": "This firmware variant is <span style=\"color: red\">not supported</span>. Please upgrade to INAV firmware. Use CLI for backup before flashing. CLI backup/restore procedure is in the documention."
|
"message": "This firmware variant is <span style=\"color: red\">not supported</span>. Please upgrade to INAV firmware. Use CLI for backup before flashing. CLI backup/restore procedure is in the documention."
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
var CONFIGURATOR = {
|
var CONFIGURATOR = {
|
||||||
// all versions are specified and compared using semantic versioning http://semver.org/
|
// all versions are specified and compared using semantic versioning http://semver.org/
|
||||||
'firmwareVersionAccepted': '2.0.0',
|
'minfirmwareVersionAccepted': '2.1.0',
|
||||||
|
'maxFirmwareVersionAccepted': '2.3.0', // COndition is < (lt) so we accept all in 2.2 branch, not 2.3 actualy
|
||||||
'connectionValid': false,
|
'connectionValid': false,
|
||||||
'connectionValidCliOnly': false,
|
'connectionValidCliOnly': false,
|
||||||
'cliActive': false,
|
'cliActive': false,
|
||||||
|
|
|
@ -257,7 +257,7 @@ function onInvalidFirmwareVariant()
|
||||||
|
|
||||||
function onInvalidFirmwareVersion()
|
function onInvalidFirmwareVersion()
|
||||||
{
|
{
|
||||||
GUI.log(chrome.i18n.getMessage('firmwareVersionNotSupported', [CONFIGURATOR.firmwareVersionAccepted]));
|
GUI.log(chrome.i18n.getMessage('firmwareVersionNotSupported', [CONFIGURATOR.minfirmwareVersionAccepted], [CONFIGURATOR.maxFirmwareVersionAccepted]));
|
||||||
CONFIGURATOR.connectionValid = true; // making it possible to open the CLI tab
|
CONFIGURATOR.connectionValid = true; // making it possible to open the CLI tab
|
||||||
GUI.allowedTabs = ['cli'];
|
GUI.allowedTabs = ['cli'];
|
||||||
onConnect();
|
onConnect();
|
||||||
|
@ -317,7 +317,7 @@ function onOpen(openInfo) {
|
||||||
MSP.send_message(MSPCodes.MSP_FC_VERSION, false, false, function () {
|
MSP.send_message(MSPCodes.MSP_FC_VERSION, false, false, function () {
|
||||||
googleAnalytics.sendEvent('Firmware', 'Variant', CONFIG.flightControllerIdentifier + ',' + CONFIG.flightControllerVersion);
|
googleAnalytics.sendEvent('Firmware', 'Variant', CONFIG.flightControllerIdentifier + ',' + CONFIG.flightControllerVersion);
|
||||||
GUI.log(chrome.i18n.getMessage('fcInfoReceived', [CONFIG.flightControllerIdentifier, CONFIG.flightControllerVersion]));
|
GUI.log(chrome.i18n.getMessage('fcInfoReceived', [CONFIG.flightControllerIdentifier, CONFIG.flightControllerVersion]));
|
||||||
if (semver.gte(CONFIG.flightControllerVersion, CONFIGURATOR.firmwareVersionAccepted)) {
|
if (semver.gte(CONFIG.flightControllerVersion, CONFIGURATOR.minfirmwareVersionAccepted) && semver.lt(CONFIG.flightControllerVersion, CONFIGURATOR.maxfirmwareVersionAccepted)) {
|
||||||
mspHelper.getCraftName(function(name) {
|
mspHelper.getCraftName(function(name) {
|
||||||
if (name) {
|
if (name) {
|
||||||
CONFIG.name = name;
|
CONFIG.name = name;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue