default and initial setup renamed to landing and setup, including object adjustments

10.3.x-maintenance
cTn 2014-09-20 13:51:23 +02:00
parent cb48e8d8b6
commit 4412f9c263
12 changed files with 580 additions and 579 deletions

View File

@ -50,7 +50,7 @@ $(document).ready(function () {
$('#content').empty();
// load default html
TABS.default.initialize();
TABS.landing.initialize();
}
$(this).data("clicks", !clicks);

View File

@ -6,8 +6,8 @@
<link type="text/css" rel="stylesheet" href="./main.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/default.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/initial_setup.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/landing.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/setup.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/configuration.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/pid_tuning.css" media="all" />
<link type="text/css" rel="stylesheet" href="./tabs/receiver.css" media="all" />
@ -40,8 +40,8 @@
<script type="text/javascript" src="./js/localization.js"></script>
<script type="text/javascript" src="./main.js"></script>
<script type="text/javascript" src="./tabs/default.js"></script>
<script type="text/javascript" src="./tabs/initial_setup.js"></script>
<script type="text/javascript" src="./tabs/landing.js"></script>
<script type="text/javascript" src="./tabs/setup.js"></script>
<script type="text/javascript" src="./tabs/configuration.js"></script>
<script type="text/javascript" src="./tabs/pid_tuning.js"></script>
<script type="text/javascript" src="./tabs/receiver.js"></script>
@ -104,7 +104,7 @@
</div>
<div id="tabs">
<ul>
<li class="tab_initial_setup"><a href="#" i18n="tabSetup"></a></li>
<li class="tab_setup"><a href="#" i18n="tabSetup"></a></li>
<li class="tab_configuration"><a href="#" i18n="tabConfiguration"></a></li>
<li class="tab_pid_tuning"><a href="#" i18n="tabPidTuning"></a></li>
<li class="tab_receiver"><a href="#" i18n="tabReceiver"></a></li>
@ -113,8 +113,8 @@
<li class="tab_gps"><a href="#" i18n="tabGPS"></a></li>
<li class="tab_motor_outputs"><a href="#" i18n="tabMotorTesting"></a></li>
<li class="tab_sensors"><a href="#" i18n="tabRawSensorData"></a></li>
<li class="tab_cli"><a href="#" i18n="tabCLI"></a></li>
<li class="tab_logging"><a href="#" i18n="tabLogging"></a></li>
<li class="tab_cli"><a href="#" i18n="tabCLI"></a></li>
</ul>
<div class="clear-both"></div>
</div>

15
main.js
View File

@ -85,8 +85,8 @@ $(document).ready(function () {
}
switch (tab) {
case 'tab_initial_setup':
TABS.initial_setup.initialize(content_ready);
case 'tab_setup':
TABS.setup.initialize(content_ready);
break;
case 'tab_configuration':
TABS.configuration.initialize(content_ready);
@ -112,18 +112,21 @@ $(document).ready(function () {
case 'tab_sensors':
TABS.sensors.initialize(content_ready);
break;
case 'tab_cli':
TABS.cli.initialize(content_ready);
break;
case 'tab_logging':
TABS.logging.initialize(content_ready);
break;
case 'tab_cli':
TABS.cli.initialize(content_ready);
break;
default:
console.log('Tab not found');
}
});
}
});
TABS.default.initialize();
TABS.landing.initialize();
// options
$('a#options').click(function () {

View File

@ -1,160 +0,0 @@
.tab-default .left {
width: 60%;
}
.tab-default .right {
float: left;
margin-left: 10px;
width: calc(40% - 10px);
}
.tab-default .optional_permissions {
display: none;
margin-bottom: 10px;
border: 1px solid silver;
}
.tab-default .optional_permissions .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #cd4c4c;
}
.tab-default .optional_permissions p {
padding: 5px;
}
.tab-default .optional_permissions a {
display: block;
float: left;
height: 28px;
line-height: 28px;
margin: 0 0 5px 5px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.tab-default .optional_permissions a:hover {
background-color: #dedcdc;
}
.welcome {
margin-bottom: 10px;
padding: 5px;
border: 1px solid silver;
}
.welcome a {
font-weight: bold;
}
.welcome a:hover {
text-decoration: underline;
}
.changelog {
margin: 0 0 10px 0;
border: 1px solid silver;
}
.changelog .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #3f4241;
}
.changelog .wrapper {
height: 150px;
padding: 5px;
overflow-y: scroll;
overflow-x: hidden;
-webkit-user-select: text;
}
.changelog .wrapper span {
font-weight: bold;
}
.changelog .wrapper p {
margin-bottom: 5px;
}
.donate {
padding: 0 0 5px 0;
border: 1px solid silver;
}
.donate .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #3f4241;
}
.donate p {
padding: 5px;
}
.donate a {
display: block;
width: 74px;
height: 21px;
margin: auto;
}
.firmware_flasher {
display: block;
float: right;
height: 28px;
line-height: 28px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.firmware_flasher:hover {
background-color: #dedcdc;
}
.tab-default .sponsors {
margin-top: 10px;
border: 1px solid silver;
}
.tab-default .sponsors .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #3f4241;
}
.tab-default .sponsors p {
padding: 5px;
}
.tab-default .sponsors p a {
font-weight: bold;
}
.tab-default .sponsors p a:hover {
text-decoration: underline;
}

View File

@ -316,7 +316,7 @@ TABS.firmware_flasher.initialize = function (callback) {
$('a.back').click(function () {
if (!GUI.connect_lock) { // button disabled while flashing is in progress
GUI.tab_switch_cleanup(function () {
TABS.default.initialize();
TABS.landing.initialize();
});
} else {
GUI.log(chrome.i18n.getMessage('firmwareFlasherWaitForFinish'));

View File

@ -1,388 +0,0 @@
/* temporary styles that are used during compatibility period */
.tab-initial_setup .CAP_BASEFLIGHT_CONFIG,
.tab-initial_setup .COMPATIBILITY {
display: none;
height: calc(100% - 138px);
}
.tab-initial_setup .CAP_BASEFLIGHT_CONFIG #interactive_block {
width: calc(100% - 199px);
}
.tab-initial_setup .CAP_BASEFLIGHT_CONFIG .gps {
width: 185px;
}
.tab-initial_setup .CAP_BASEFLIGHT_CONFIG .gps .fields {
padding: 5px 5px 3px 5px;
}
.tab-initial_setup .CAP_BASEFLIGHT_CONFIG .gps dt {
float: left;
width: 85px;
height: 20px;
margin-bottom: 2px;
line-height: 20px;
}
.tab-initial_setup .CAP_BASEFLIGHT_CONFIG .gps dd {
height: 20px;
margin-left: 85px;
margin-bottom: 2px;
line-height: 20px;
}
/* temporary styles end*/
.tab-initial_setup {
height: 100%;
}
.tab-initial_setup .section {
clear: both;
padding-bottom: 8px;
}
.tab-initial_setup .section a {
display: block;
float: left;
width: 170px;
height: 24px;
line-height: 24px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.tab-initial_setup .section a:hover {
background-color: #dedcdc;
}
.tab-initial_setup .section a.calibrating {
background-color: #c1c1c1;
}
.tab-initial_setup .section a.calibrating:hover {
cursor: default;
background-color: #c1c1c1;
}
.tab-initial_setup .section a.disabled {
background-color: #c1c1c1;
}
.tab-initial_setup .section a.disabled:hover {
cursor: default;
}
.tab-initial_setup .section a.backup {
width: 80px;
margin-right: 10px;
}
.tab-initial_setup .section a.restore {
width: 80px;
}
.tab-initial_setup .section p {
margin-left: 180px;
padding: 0 0 0 5px;
height: 25px;
line-height: 25px;
border-bottom: 1px solid #e5e5e5;
}
#interactive_block {
float: left;
position: relative;
height: 100%;
width: calc(100% - 522px);
border: 1px solid silver;
background-color: white;
}
#interactive_block .model {
float: left;
height: 15px;
margin: 10px 0 0 10px;
font-weight: bold;
}
#interactive_block .modelMixDiagram {
position: absolute;
top: 32px;
left: 10px;
height: 95px;
}
#interactive_block .modelMixAirplane { /* Position airplane correctly */
height: 115px;
padding-left: 0px;
}
#interactive_block .modelMixCustom { /* Position question mark correctly */
height: 75px;
padding-left: 25px;
}
#interactive_block .heading {
float: right;
height: 15px;
margin: 10px 10px 0 0;
font-weight: bold;
}
#interactive_block a.reset {
position: absolute;
display: block;
bottom: 10px;
right: 10px;
height: 28px;
line-height: 28px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
z-index: 100;
}
#interactive_block a.reset:hover {
background-color: #dedcdc;
}
#canvas_wrapper {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.tab-initial_setup .block_wrapper {
font-size: 0;
}
.tab-initial_setup .block {
float: left;
display: block;
margin-left: 10px;
border: 1px solid silver;
}
.tab-initial_setup .block .head {
display: block;
text-align: center;
line-height: 20px;
font-weight: bold;
border-bottom: 1px solid silver;
background-color: #ececec;
}
.tab-initial_setup .mixer {
width: 200px;
}
.tab-initial_setup .mixer .preview {
display: block;
width: 200px;
height: 140px;
margin: 5px 0 5px 0;
}
.tab-initial_setup .mixer select {
display: block;
padding-left: 5px;
width: 100%;
height: 20px;
line-height: 20px;
font-weight: bold;
border-top: 1px solid silver;
}
.tab-initial_setup .block .info {
width: 200px;
}
.tab-initial_setup .battery,
.tab-initial_setup .throttle,
.tab-initial_setup .acc-trim,
.tab-initial_setup .magnetometer,
.tab-initial_setup .info {
display: inline-block;
vertical-align: top;
margin: 0 0 10px 10px;
font-size: 12px;
border: 1px solid silver;
}
.tab-initial_setup .battery .head,
.tab-initial_setup .throttle .head,
.tab-initial_setup .acc-trim .head,
.tab-initial_setup .magnetometer .head,
.tab-initial_setup .info .head {
display: block;
text-align: center;
line-height: 20px;
font-weight: bold;
border-bottom: 1px solid silver;
background-color: #ececec;
}
.tab-initial_setup .battery .fields,
.tab-initial_setup .throttle .fields,
.tab-initial_setup .magnetometer .fields,
.tab-initial_setup .info .fields {
padding: 5px 5px 3px 5px;
}
.tab-initial_setup .acc-trim .fields {
padding: 5px 5px 3px 5px;
}
.tab-initial_setup .magnetometer .fields {
padding: 5px 5px 5px 5px;
}
.tab-initial_setup .battery dt {
float: left;
width: 105px;
height: 22px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-initial_setup .battery dd {
height: 22px;
margin-left: 105px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-initial_setup .battery input {
width: 68px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-initial_setup .throttle dt {
float: left;
width: 90px;
height: 22px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-initial_setup .throttle dd {
height: 22px;
margin-left: 90px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-initial_setup .throttle input {
width: 60px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-initial_setup .acc-trim dt {
float: left;
width: 65px;
height: 22px;
line-height: 22px;
margin-bottom: 2px;
}
.tab-initial_setup .acc-trim dd {
height: 22px;
margin-left: 65px;
margin-bottom: 2px;
}
.tab-initial_setup .acc-trim input {
width: 60px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-initial_setup .magnetometer dt {
float: left;
width: 90px;
height: 20px;
line-height: 22px;
margin-bottom: 2px;
}
.tab-initial_setup .magnetometer dd {
height: 20px;
line-height: 22px;
margin-left: 90px;
margin-bottom: 2px;
}
.tab-initial_setup .magnetometer input {
width: 60px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-initial_setup .info dt {
float: left;
width: 99px;
height: 20px;
line-height: 20px;
}
.tab-initial_setup .info dd {
width: 76px;
height: 20px;
line-height: 20px;
margin-left: 99px;
}
.tab-initial_setup .buttons {
width: calc(100% - 20px);
position: absolute;
bottom: 10px;
}
.tab-initial_setup .update {
display: block;
float: right;
height: 28px;
line-height: 28px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.tab-initial_setup .update:hover {
background-color: #dedcdc;
}

160
tabs/landing.css Normal file
View File

@ -0,0 +1,160 @@
.tab-landing .left {
width: 60%;
}
.tab-landing .right {
float: left;
margin-left: 10px;
width: calc(40% - 10px);
}
.tab-landing .optional_permissions {
display: none;
margin-bottom: 10px;
border: 1px solid silver;
}
.tab-landing .optional_permissions .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #cd4c4c;
}
.tab-landing .optional_permissions p {
padding: 5px;
}
.tab-landing .optional_permissions a {
display: block;
float: left;
height: 28px;
line-height: 28px;
margin: 0 0 5px 5px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.tab-landing .optional_permissions a:hover {
background-color: #dedcdc;
}
.welcome {
margin-bottom: 10px;
padding: 5px;
border: 1px solid silver;
}
.welcome a {
font-weight: bold;
}
.welcome a:hover {
text-decoration: underline;
}
.changelog {
margin: 0 0 10px 0;
border: 1px solid silver;
}
.changelog .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #3f4241;
}
.changelog .wrapper {
height: 150px;
padding: 5px;
overflow-y: scroll;
overflow-x: hidden;
-webkit-user-select: text;
}
.changelog .wrapper span {
font-weight: bold;
}
.changelog .wrapper p {
margin-bottom: 5px;
}
.donate {
padding: 0 0 5px 0;
border: 1px solid silver;
}
.donate .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #3f4241;
}
.donate p {
padding: 5px;
}
.donate a {
display: block;
width: 74px;
height: 21px;
margin: auto;
}
.firmware_flasher {
display: block;
float: right;
height: 28px;
line-height: 28px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.firmware_flasher:hover {
background-color: #dedcdc;
}
.tab-landing .sponsors {
margin-top: 10px;
border: 1px solid silver;
}
.tab-landing .sponsors .title {
line-height: 20px;
text-align: center;
font-weight: bold;
color: white;
border-bottom: 1px solid silver;
background-color: #3f4241;
}
.tab-landing .sponsors p {
padding: 5px;
}
.tab-landing .sponsors p a {
font-weight: bold;
}
.tab-landing .sponsors p a:hover {
text-decoration: underline;
}

View File

@ -1,4 +1,4 @@
<div class="tab-default">
<div class="tab-landing">
<div class="left">
<div class="optional_permissions">
<div class="title" i18n="default_optional_permissions_head"></div>

View File

@ -1,11 +1,11 @@
'use strict';
TABS.default = {};
TABS.default.initialize = function (callback) {
TABS.landing = {};
TABS.landing.initialize = function (callback) {
GUI.active_tab_ref = this;
GUI.active_tab = 'default';
GUI.active_tab = 'landing';
$('#content').load("./tabs/default.html", function () {
$('#content').load("./tabs/landing.html", function () {
//check_usb_permissions(); // temporary enabled in dev branch, should be commented out untill DFU support goes live
// translate to user-selected language
@ -27,6 +27,6 @@ TABS.default.initialize = function (callback) {
});
};
TABS.default.cleanup = function (callback) {
TABS.landing.cleanup = function (callback) {
if (callback) callback();
};

386
tabs/setup.css Normal file
View File

@ -0,0 +1,386 @@
/* temporary styles that are used during compatibility period */
.tab-setup .CAP_BASEFLIGHT_CONFIG,
.tab-setup .COMPATIBILITY {
display: none;
height: calc(100% - 138px);
}
.tab-setup .CAP_BASEFLIGHT_CONFIG #interactive_block {
width: calc(100% - 199px);
}
.tab-setup .CAP_BASEFLIGHT_CONFIG .gps {
width: 185px;
}
.tab-setup .CAP_BASEFLIGHT_CONFIG .gps .fields {
padding: 5px 5px 3px 5px;
}
.tab-setup .CAP_BASEFLIGHT_CONFIG .gps dt {
float: left;
width: 85px;
height: 20px;
margin-bottom: 2px;
line-height: 20px;
}
.tab-setup .CAP_BASEFLIGHT_CONFIG .gps dd {
height: 20px;
margin-left: 85px;
margin-bottom: 2px;
line-height: 20px;
}
/* temporary styles end*/
.tab-setup {
height: 100%;
}
.tab-setup .section {
clear: both;
padding-bottom: 8px;
}
.tab-setup .section a {
display: block;
float: left;
width: 170px;
height: 24px;
line-height: 24px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.tab-setup .section a:hover {
background-color: #dedcdc;
}
.tab-setup .section a.calibrating {
background-color: #c1c1c1;
}
.tab-setup .section a.calibrating:hover {
cursor: default;
background-color: #c1c1c1;
}
.tab-setup .section a.disabled {
background-color: #c1c1c1;
}
.tab-setup .section a.disabled:hover {
cursor: default;
}
.tab-setup .section a.backup {
width: 80px;
margin-right: 10px;
}
.tab-setup .section a.restore {
width: 80px;
}
.tab-setup .section p {
margin-left: 180px;
padding: 0 0 0 5px;
height: 25px;
line-height: 25px;
border-bottom: 1px solid #e5e5e5;
}
#interactive_block {
float: left;
position: relative;
height: 100%;
width: calc(100% - 522px);
border: 1px solid silver;
background-color: white;
}
#interactive_block .model {
float: left;
height: 15px;
margin: 10px 0 0 10px;
font-weight: bold;
}
#interactive_block .modelMixDiagram {
position: absolute;
top: 32px;
left: 10px;
height: 95px;
}
#interactive_block .modelMixAirplane { /* Position airplane correctly */
height: 115px;
padding-left: 0px;
}
#interactive_block .modelMixCustom { /* Position question mark correctly */
height: 75px;
padding-left: 25px;
}
#interactive_block .heading {
float: right;
height: 15px;
margin: 10px 10px 0 0;
font-weight: bold;
}
#interactive_block a.reset {
position: absolute;
display: block;
bottom: 10px;
right: 10px;
height: 28px;
line-height: 28px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
z-index: 100;
}
#interactive_block a.reset:hover {
background-color: #dedcdc;
}
#canvas_wrapper {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.tab-setup .block_wrapper {
font-size: 0;
}
.tab-setup .block {
float: left;
display: block;
margin-left: 10px;
border: 1px solid silver;
}
.tab-setup .block .head {
display: block;
text-align: center;
line-height: 20px;
font-weight: bold;
border-bottom: 1px solid silver;
background-color: #ececec;
}
.tab-setup .mixer {
width: 200px;
}
.tab-setup .mixer .preview {
display: block;
width: 200px;
height: 140px;
margin: 5px 0 5px 0;
}
.tab-setup .mixer select {
display: block;
padding-left: 5px;
width: 100%;
height: 20px;
line-height: 20px;
font-weight: bold;
border-top: 1px solid silver;
}
.tab-setup .block .info {
width: 200px;
}
.tab-setup .battery,
.tab-setup .throttle,
.tab-setup .acc-trim,
.tab-setup .magnetometer,
.tab-setup .info {
display: inline-block;
vertical-align: top;
margin: 0 0 10px 10px;
font-size: 12px;
border: 1px solid silver;
}
.tab-setup .battery .head,
.tab-setup .throttle .head,
.tab-setup .acc-trim .head,
.tab-setup .magnetometer .head,
.tab-setup .info .head {
display: block;
text-align: center;
line-height: 20px;
font-weight: bold;
border-bottom: 1px solid silver;
background-color: #ececec;
}
.tab-setup .battery .fields,
.tab-setup .throttle .fields,
.tab-setup .magnetometer .fields,
.tab-setup .info .fields {
padding: 5px 5px 3px 5px;
}
.tab-setup .acc-trim .fields {
padding: 5px 5px 3px 5px;
}
.tab-setup .magnetometer .fields {
padding: 5px 5px 5px 5px;
}
.tab-setup .battery dt {
float: left;
width: 105px;
height: 22px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-setup .battery dd {
height: 22px;
margin-left: 105px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-setup .battery input {
width: 68px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-setup .throttle dt {
float: left;
width: 90px;
height: 22px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-setup .throttle dd {
height: 22px;
margin-left: 90px;
margin-bottom: 2px;
line-height: 22px;
}
.tab-setup .throttle input {
width: 60px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-setup .acc-trim dt {
float: left;
width: 65px;
height: 22px;
line-height: 22px;
margin-bottom: 2px;
}
.tab-setup .acc-trim dd {
height: 22px;
margin-left: 65px;
margin-bottom: 2px;
}
.tab-setup .acc-trim input {
width: 60px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-setup .magnetometer dt {
float: left;
width: 90px;
height: 20px;
line-height: 22px;
margin-bottom: 2px;
}
.tab-setup .magnetometer dd {
height: 20px;
line-height: 22px;
margin-left: 90px;
margin-bottom: 2px;
}
.tab-setup .magnetometer input {
width: 60px;
height: 20px;
line-height: 20px;
border: 1px solid silver;
text-align: center;
}
.tab-setup .info dt {
float: left;
width: 99px;
height: 20px;
line-height: 20px;
}
.tab-setup .info dd {
width: 76px;
height: 20px;
line-height: 20px;
margin-left: 99px;
}
.tab-setup .buttons {
width: calc(100% - 20px);
position: absolute;
bottom: 10px;
}
.tab-setup .update {
display: block;
float: right;
height: 28px;
line-height: 28px;
padding: 0 15px 0 15px;
text-align: center;
font-weight: bold;
border: 1px solid silver;
background-color: #ececec;
}
.tab-setup .update:hover {
background-color: #dedcdc;
}

View File

@ -1,4 +1,4 @@
<div class="tab-initial_setup">
<div class="tab-setup">
<div class="section">
<a class="calibrateAccel" href="#" i18n="initialSetupButtonCalibrateAccel"></a>
<p i18n="initialSetupCalibrateAccelText">

View File

@ -1,13 +1,13 @@
'use strict';
TABS.initial_setup = {
TABS.setup = {
yaw_fix: 0.0
};
TABS.initial_setup.initialize = function (callback) {
TABS.setup.initialize = function (callback) {
var self = this;
GUI.active_tab_ref = this;
GUI.active_tab = 'initial_setup';
GUI.active_tab = 'setup';
googleAnalytics.sendAppView('Setup');
function load_ident() {
@ -27,7 +27,7 @@ TABS.initial_setup.initialize = function (callback) {
}
function load_html() {
$('#content').load("./tabs/initial_setup.html", process_html);
$('#content').load("./tabs/setup.html", process_html);
}
MSP.send_message(MSP_codes.MSP_ACC_TRIM, false, false, load_ident);
@ -199,13 +199,13 @@ TABS.initial_setup.initialize = function (callback) {
// During this period MCU won't be able to process any serial commands because its locked in a for/while loop
// until this operation finishes, sending more commands through data_poll() will result in serial buffer overflow
GUI.interval_pause('initial_setup_data_pull');
GUI.interval_pause('setup_data_pull');
MSP.send_message(MSP_codes.MSP_ACC_CALIBRATION, false, false, function () {
GUI.log(chrome.i18n.getMessage('initialSetupAccelCalibStarted'));
});
GUI.timeout_add('button_reset', function () {
GUI.interval_resume('initial_setup_data_pull');
GUI.interval_resume('setup_data_pull');
GUI.log(chrome.i18n.getMessage('initialSetupAccelCalibEnded'));
@ -236,7 +236,7 @@ TABS.initial_setup.initialize = function (callback) {
GUI.log(chrome.i18n.getMessage('initialSetupSettingsRestored'));
GUI.tab_switch_cleanup(function() {
TABS.initial_setup.initialize();
TABS.setup.initialize();
});
});
});
@ -291,7 +291,7 @@ TABS.initial_setup.initialize = function (callback) {
self.render3D();
}
GUI.interval_add('initial_setup_data_pull', get_analog_data, 50, true);
GUI.interval_add('setup_data_pull', get_analog_data, 50, true);
// status data pulled via separate timer with static speed
GUI.interval_add('status_pull', function status_pull () {
@ -302,7 +302,7 @@ TABS.initial_setup.initialize = function (callback) {
}
};
TABS.initial_setup.initialize3D = function (compatibility) {
TABS.setup.initialize3D = function (compatibility) {
var self = this;
if (compatibility) {
@ -376,7 +376,7 @@ TABS.initial_setup.initialize3D = function (compatibility) {
});
};
TABS.initial_setup.cleanup = function (callback) {
TABS.setup.cleanup = function (callback) {
$(window).unbind('resize');
if (callback) callback();