Added hardware / firmware information to the status bar. Also fixed receiver tab alignment.

10.3.x-maintenance
mikeller 2017-08-22 00:15:43 +12:00
parent 0401ad77ca
commit 4639fbea48
4 changed files with 35 additions and 7 deletions

View File

@ -207,6 +207,15 @@
"fcInfoReceived": {
"message": "Flight controller info, identifier: <strong>$1</strong>, version: <strong>$2</strong>"
},
"versionLabelHardware": {
"message": "Board"
},
"versionLabelFirmware": {
"message": "Firmware"
},
"versionLabelConfigurator": {
"message": "Configurator"
},
"notifications_app_just_updated_to_version": {
"message": "Application just updated to version: $1"
@ -1823,16 +1832,16 @@
"message": "Indicator (uses position on matrix)"
},
"controlAxisRoll": {
"message": "Roll[A]"
"message": "Roll [A]"
},
"controlAxisPitch": {
"message": "Pitch[E]"
"message": "Pitch [E]"
},
"controlAxisYaw": {
"message": "Yaw[R]"
"message": "Yaw [R]"
},
"controlAxisThrottle": {
"message": "Throttle[T]"
"message": "Throttle [T]"
},
"controlAxisAux1": {
"message": "AUX 1"

View File

@ -196,6 +196,7 @@ function onOpen(openInfo) {
MSP.send_message(MSPCodes.MSP_FC_VERSION, false, false, function () {
GUI.log(chrome.i18n.getMessage('fcInfoReceived', [CONFIG.flightControllerIdentifier, CONFIG.flightControllerVersion]));
updateStatusBarVersion(CONFIG.flightControllerVersion, CONFIG.flightControllerIdentifier);
MSP.send_message(MSPCodes.MSP_BUILD_INFO, false, false, function () {
@ -204,6 +205,7 @@ function onOpen(openInfo) {
MSP.send_message(MSPCodes.MSP_BOARD_INFO, false, false, function () {
GUI.log(chrome.i18n.getMessage('boardInfoReceived', [CONFIG.boardIdentifier, CONFIG.boardVersion]));
updateStatusBarVersion(CONFIG.flightControllerVersion, CONFIG.flightControllerIdentifier, CONFIG.boardIdentifier);
MSP.send_message(MSPCodes.MSP_UID, false, false, function () {
GUI.log(chrome.i18n.getMessage('uniqueDeviceIdReceived', [CONFIG.uid[0].toString(16) + CONFIG.uid[1].toString(16) + CONFIG.uid[2].toString(16)]));
@ -338,6 +340,8 @@ function onClosed(result) {
$('#tabs ul.mode-connected-cli').hide();
$('#tabs ul.mode-disconnected').show();
updateStatusBarVersion();
var sensor_state = $('#sensor-status');
sensor_state.hide();

17
main.js
View File

@ -9,8 +9,8 @@ $(document).ready(function () {
'Chrome: <strong>' + window.navigator.appVersion.replace(/.*Chrome\/([0-9.]*).*/, "$1") + '</strong>, ' +
'Configurator: <strong>' + chrome.runtime.getManifest().version + '</strong>');
$('#status-bar .version').text(chrome.runtime.getManifest().version);
$('#logo .version').text(chrome.runtime.getManifest().version);
updateStatusBarVersion();
// notification messages for various operating systems
switch (GUI.operating_system) {
@ -517,3 +517,18 @@ function generateFilename(prefix, suffix) {
return filename + '.' + suffix;
}
function updateStatusBarVersion(firmwareVersion, firmwareId, hardwareId) {
var versionText = '';
if (hardwareId) {
versionText = versionText + chrome.i18n.getMessage('versionLabelHardware') + ': ' + hardwareId + ', ';
}
if (firmwareVersion) {
versionText = versionText + chrome.i18n.getMessage('versionLabelFirmware') + ': ' + firmwareId + ' ' + firmwareVersion + ', ';
}
versionText = versionText + chrome.i18n.getMessage('versionLabelConfigurator') + ': ' + chrome.runtime.getManifest().version;
$('#status-bar .version').text(versionText);
}

View File

@ -38,12 +38,12 @@
.tab-receiver .bars .name {
padding: 0 10px 0 0;
width: 50px;
width: 60px;
text-align: right;
}
.tab-receiver .bars .meter {
width: calc(100% - 60px);
width: calc(100% - 70px);
}
.tab-receiver .bars .meter-bar {