Merge pull request #249 from AustinSaintAubin/development
Added Roll & Pitch to Setup Tab10.3.x-maintenance
commit
f4c12c40e7
|
@ -372,8 +372,8 @@
|
|||
"initialSetupModel": {
|
||||
"message": "Model: $1"
|
||||
},
|
||||
"initialSetupHeading": {
|
||||
"message": "Heading: $1 deg"
|
||||
"initialSetupAttitude": {
|
||||
"message": "$1 deg"
|
||||
},
|
||||
"initialSetupAccelCalibStarted": {
|
||||
"message": "Accelerometer calibration started"
|
||||
|
|
|
@ -68,12 +68,23 @@
|
|||
border: 1px solid silver;
|
||||
background-color: white;
|
||||
}
|
||||
.tab-setup #interactive_block .heading {
|
||||
.tab-setup #interactive_block .attitude {
|
||||
float: right;
|
||||
height: 15px;
|
||||
margin: 10px 10px 0px 0px
|
||||
}
|
||||
|
||||
margin: 10px 10px 0 0;
|
||||
font-weight: bold;
|
||||
.tab-setup #interactive_block .attitude dt {
|
||||
float: left;
|
||||
width: 64px;
|
||||
font-weight: 700;
|
||||
text-align: right
|
||||
}
|
||||
|
||||
.tab-setup #interactive_block .attitude dd {
|
||||
display: block;
|
||||
margin-left: 64px;
|
||||
width: 64px;
|
||||
text-align: right
|
||||
}
|
||||
.tab-setup #interactive_block a.reset {
|
||||
position: absolute;
|
||||
|
|
|
@ -25,7 +25,13 @@
|
|||
<div id="canvas_wrapper">
|
||||
<canvas id="canvas"></canvas>
|
||||
</div>
|
||||
<span class="heading"></span>
|
||||
<div class="attitude">
|
||||
<dl>
|
||||
<dt>Heading:</dt><dd class="heading"> </dd>
|
||||
<dt>Pitch:</dt><dd class="pitch"> </dd>
|
||||
<dt>Roll:</dt><dd class="roll"> </dd>
|
||||
</dl>
|
||||
</div>
|
||||
<a class="reset" href="#" i18n="initialSetupButtonResetZaxis"></a>
|
||||
</div>
|
||||
<div class="block info">
|
||||
|
|
|
@ -47,8 +47,13 @@ TABS.setup.initialize = function (callback) {
|
|||
// initialize 3D
|
||||
self.initialize3D();
|
||||
|
||||
// set roll in interactive block
|
||||
$('span.roll').text(chrome.i18n.getMessage('initialSetupAttitude', [0]));
|
||||
// set pitch in interactive block
|
||||
$('span.pitch').text(chrome.i18n.getMessage('initialSetupAttitude', [0]));
|
||||
// set heading in interactive block
|
||||
$('span.heading').text(chrome.i18n.getMessage('initialSetupheading', [0]));
|
||||
$('span.heading').text(chrome.i18n.getMessage('initialSetupAttitude', [0]));
|
||||
|
||||
|
||||
// check if we have magnetometer
|
||||
if (!bit_check(CONFIG.activeSensors, 2)) {
|
||||
|
@ -151,7 +156,9 @@ TABS.setup.initialize = function (callback) {
|
|||
gpsSats_e = $('.gpsSats'),
|
||||
gpsLat_e = $('.gpsLat'),
|
||||
gpsLon_e = $('.gpsLon'),
|
||||
heading_e = $('span.heading');
|
||||
roll_e = $('dd.roll'),
|
||||
pitch_e = $('dd.pitch'),
|
||||
heading_e = $('dd.heading');
|
||||
|
||||
function get_slow_data() {
|
||||
MSP.send_message(MSP_codes.MSP_STATUS);
|
||||
|
@ -175,7 +182,9 @@ TABS.setup.initialize = function (callback) {
|
|||
|
||||
function get_fast_data() {
|
||||
MSP.send_message(MSP_codes.MSP_ATTITUDE, false, false, function () {
|
||||
heading_e.text(chrome.i18n.getMessage('initialSetupheading', [SENSOR_DATA.kinematics[2]]));
|
||||
roll_e.text(chrome.i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[0]]));
|
||||
pitch_e.text(chrome.i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[1]]));
|
||||
heading_e.text(chrome.i18n.getMessage('initialSetupAttitude', [SENSOR_DATA.kinematics[2]]));
|
||||
self.render3D();
|
||||
self.updateInstruments();
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue