Merge pull request #687 from DanNixon/clarify_arming_disable_string
Clarify arming disable readout in setup tab10.3.x-maintenance
commit
055d701bdd
|
@ -457,6 +457,9 @@
|
|||
"initialSetupArmingAllowed": {
|
||||
"message": "Arming Allowed"
|
||||
},
|
||||
"initialSetupArmingDisableFlagsTooltip": {
|
||||
"message": "List of flags indicating why arming is currently not allowed. Please refer to the Wiki for a description of what these flags mean."
|
||||
},
|
||||
"initialSetupGPSHead": {
|
||||
"message": "GPS"
|
||||
},
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<div class="spacer_box">
|
||||
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cf_table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<tr id="arming-disable-flag-row" class="cf_tip">
|
||||
<td i18n="initialSetupArmingDisableFlags"></td>
|
||||
<td class="arming-disable-flags">0</td>
|
||||
</tr>
|
||||
|
|
|
@ -59,6 +59,9 @@ TABS.setup.initialize = function (callback) {
|
|||
|
||||
self.initializeInstruments();
|
||||
|
||||
|
||||
$('#arming-disable-flag-row').attr('title', chrome.i18n.getMessage('initialSetupArmingDisableFlagsTooltip'));
|
||||
|
||||
// UI Hooks
|
||||
$('a.calibrateAccel').click(function () {
|
||||
var self = $(this);
|
||||
|
@ -182,7 +185,19 @@ TABS.setup.initialize = function (callback) {
|
|||
|
||||
function get_slow_data() {
|
||||
MSP.send_message(MSPCodes.MSP_STATUS, false, false, function() {
|
||||
arming_disable_flags_e.text(CONFIG.armingDisableFlags == 0 ? chrome.i18n.getMessage('initialSetupArmingAllowed') : CONFIG.armingDisableFlags.toString(2));
|
||||
var armingString = '';
|
||||
if (CONFIG.armingDisableFlags == 0) {
|
||||
armingString = chrome.i18n.getMessage('initialSetupArmingAllowed');
|
||||
} else {
|
||||
var flagIndicies = [];
|
||||
for (var i = 0; i < 32; i++) {
|
||||
if (CONFIG.armingDisableFlags & (1 << i)) {
|
||||
flagIndicies.push(i);
|
||||
}
|
||||
}
|
||||
armingString = flagIndicies;
|
||||
}
|
||||
arming_disable_flags_e.text(armingString);
|
||||
});
|
||||
|
||||
MSP.send_message(MSPCodes.MSP_ANALOG, false, false, function () {
|
||||
|
|
Loading…
Reference in New Issue