1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-20 14:55:14 +03:00

Prevent Configurator from being used with other firmware than INAV

This commit is contained in:
Konstantin Sharlaimov (DigitalEntity) 2016-05-05 22:17:03 +10:00
parent 4e2f65eca6
commit 395c413992
2 changed files with 30 additions and 18 deletions

View file

@ -156,6 +156,9 @@
"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>. 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."
}, },
"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."
},
"tabSwitchConnectionRequired": { "tabSwitchConnectionRequired": {
"message": "You need to <strong>connect</strong> before you can view any of the tabs." "message": "You need to <strong>connect</strong> before you can view any of the tabs."

View file

@ -193,6 +193,8 @@ function onOpen(openInfo) {
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 (CONFIG.flightControllerIdentifier == 'INAV') {
MSP.send_message(MSP_codes.MSP_BUILD_INFO, false, false, function () { MSP.send_message(MSP_codes.MSP_BUILD_INFO, false, false, function () {
googleAnalytics.sendEvent('Firmware', 'Using', CONFIG.buildInfo); googleAnalytics.sendEvent('Firmware', 'Using', CONFIG.buildInfo);
@ -221,6 +223,13 @@ function onOpen(openInfo) {
}); });
}); });
}); });
} else {
GUI.log(chrome.i18n.getMessage('firmwareVariantNotSupported'));
CONFIGURATOR.connectionValid = true; // making it possible to open the CLI tab
GUI.allowedTabs = ['cli'];
onConnect();
$('#tabs .tab_cli a').click();
}
}); });
}); });
} else { } else {