diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 91e33056..1ad53f05 100755 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -372,8 +372,8 @@ "initialSetupModel": { "message": "Model: $1" }, - "initialSetupHeading": { - "message": "Heading: $1 deg" + "initialSetupAttitude": { + "message": "$1 deg" }, "initialSetupAccelCalibStarted": { "message": "Accelerometer calibration started" diff --git a/tabs/setup.css b/tabs/setup.css index f5b3fc64..81a7fbfc 100644 --- a/tabs/setup.css +++ b/tabs/setup.css @@ -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; diff --git a/tabs/setup.html b/tabs/setup.html index 9168ebf7..837a7859 100644 --- a/tabs/setup.html +++ b/tabs/setup.html @@ -25,7 +25,13 @@
- +
+
+
Heading:
 
+
Pitch:
 
+
Roll:
 
+
+
diff --git a/tabs/setup.js b/tabs/setup.js index a3eb794e..9a9244d6 100644 --- a/tabs/setup.js +++ b/tabs/setup.js @@ -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(); });