mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-17 05:15:20 +03:00
Added firmware version number to configurator
This commit is contained in:
parent
8885225ddb
commit
ac0edfcea1
5 changed files with 34 additions and 2 deletions
|
@ -37,6 +37,9 @@
|
|||
"deviceReady": {
|
||||
"message": "Device - <span style=\"color: #37a8db\">Ready</span>"
|
||||
},
|
||||
"fcNotConnected": {
|
||||
"message": "Not connected"
|
||||
},
|
||||
|
||||
"backupFileIncompatible": {
|
||||
"message": "Backup file provided was generated for previous version of the configurator and is incompatible with this version of configurator. Sorry"
|
||||
|
|
|
@ -202,6 +202,8 @@ function onValidFirmware()
|
|||
helper.defaultsDialog.init();
|
||||
|
||||
$('#tabs ul.mode-connected .tab_setup a').click();
|
||||
|
||||
updateFirmwareVersion();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -367,6 +369,8 @@ function onClosed(result) {
|
|||
$('#portsinput').show();
|
||||
$('#dataflash_wrapper_global').hide();
|
||||
$('#quad-status_wrapper').hide();
|
||||
|
||||
updateFirmwareVersion();
|
||||
}
|
||||
|
||||
function read_serial(info) {
|
||||
|
|
14
main.css
14
main.css
|
@ -150,6 +150,20 @@ input[type="number"]::-webkit-inner-spin-button {
|
|||
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 {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
|
|
@ -26,6 +26,10 @@
|
|||
CONFIGURATOR
|
||||
<div class="version"></div>
|
||||
</div>
|
||||
<div class="logo_text_firmware">
|
||||
FC FIRMWARE
|
||||
<div class="firmware_version"></div>
|
||||
</div>
|
||||
</div>
|
||||
<a id="options" href="#" data-i18n_title="options_title"></a>
|
||||
|
||||
|
|
11
main.js
11
main.js
|
@ -54,6 +54,7 @@ $(document).ready(function () {
|
|||
|
||||
$('#status-bar .version').text(chrome.runtime.getManifest().version);
|
||||
$('#logo .version').text(chrome.runtime.getManifest().version);
|
||||
updateFirmwareVersion();
|
||||
|
||||
// notification messages for various operating systems
|
||||
switch (GUI.operating_system) {
|
||||
|
@ -524,10 +525,16 @@ String.prototype.format = function () {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
function updateActivatedTab() {
|
||||
var activeTab = $('#tabs > ul li.active');
|
||||
activeTab.removeClass('active');
|
||||
$('a', activeTab).trigger('click');
|
||||
}
|
||||
|
||||
function updateFirmwareVersion() {
|
||||
if (CONFIGURATOR.connectionValid) {
|
||||
$('#logo .firmware_version').text(CONFIG.flightControllerVersion);
|
||||
} else {
|
||||
$('#logo .firmware_version').text(chrome.i18n.getMessage('fcNotConnected'));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue