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

Added firmware version number to configurator

This commit is contained in:
Darren Lines 2020-11-26 21:07:58 +00:00
parent 8885225ddb
commit ac0edfcea1
5 changed files with 34 additions and 2 deletions

View file

@ -37,6 +37,9 @@
"deviceReady": { "deviceReady": {
"message": "Device - <span style=\"color: #37a8db\">Ready</span>" "message": "Device - <span style=\"color: #37a8db\">Ready</span>"
}, },
"fcNotConnected": {
"message": "Not connected"
},
"backupFileIncompatible": { "backupFileIncompatible": {
"message": "Backup file provided was generated for previous version of the configurator and is incompatible with this version of configurator. Sorry" "message": "Backup file provided was generated for previous version of the configurator and is incompatible with this version of configurator. Sorry"

View file

@ -202,6 +202,8 @@ function onValidFirmware()
helper.defaultsDialog.init(); helper.defaultsDialog.init();
$('#tabs ul.mode-connected .tab_setup a').click(); $('#tabs ul.mode-connected .tab_setup a').click();
updateFirmwareVersion();
}); });
}); });
}); });
@ -367,6 +369,8 @@ function onClosed(result) {
$('#portsinput').show(); $('#portsinput').show();
$('#dataflash_wrapper_global').hide(); $('#dataflash_wrapper_global').hide();
$('#quad-status_wrapper').hide(); $('#quad-status_wrapper').hide();
updateFirmwareVersion();
} }
function read_serial(info) { function read_serial(info) {

View file

@ -150,6 +150,20 @@ input[type="number"]::-webkit-inner-spin-button {
margin-left: 1em; margin-left: 1em;
} }
.logo_text_firmware {
position: absolute;
height: 20px;
left: 0;
top: 80px;
color: #949494;
opacity: 0.5;
}
.logo_text_firmware .firmware_version {
float: right;
margin-left: 2.1em;
}
#port-picker { #port-picker {
position: relative; position: relative;
width: 100%; width: 100%;

View file

@ -26,6 +26,10 @@
CONFIGURATOR CONFIGURATOR
<div class="version"></div> <div class="version"></div>
</div> </div>
<div class="logo_text_firmware">
FC FIRMWARE
<div class="firmware_version"></div>
</div>
</div> </div>
<a id="options" href="#" data-i18n_title="options_title"></a> <a id="options" href="#" data-i18n_title="options_title"></a>

11
main.js
View file

@ -54,6 +54,7 @@ $(document).ready(function () {
$('#status-bar .version').text(chrome.runtime.getManifest().version); $('#status-bar .version').text(chrome.runtime.getManifest().version);
$('#logo .version').text(chrome.runtime.getManifest().version); $('#logo .version').text(chrome.runtime.getManifest().version);
updateFirmwareVersion();
// notification messages for various operating systems // notification messages for various operating systems
switch (GUI.operating_system) { switch (GUI.operating_system) {
@ -524,10 +525,16 @@ String.prototype.format = function () {
}); });
}; };
function updateActivatedTab() { function updateActivatedTab() {
var activeTab = $('#tabs > ul li.active'); var activeTab = $('#tabs > ul li.active');
activeTab.removeClass('active'); activeTab.removeClass('active');
$('a', activeTab).trigger('click'); $('a', activeTab).trigger('click');
} }
function updateFirmwareVersion() {
if (CONFIGURATOR.connectionValid) {
$('#logo .firmware_version').text(CONFIG.flightControllerVersion);
} else {
$('#logo .firmware_version').text(chrome.i18n.getMessage('fcNotConnected'));
}
}