1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-20 06:45:16 +03:00

better handling of wrong baud rate

+ some tiny UI changes due to the #content change for mac os x which
kinda broke the "floating" tabs hack with absolute position
This commit is contained in:
cTn 2013-04-13 02:32:35 +02:00
parent b477d1511a
commit b892fcb376
3 changed files with 18 additions and 22 deletions

View file

@ -124,28 +124,13 @@ a:hover {
background-color: #0d8b13;
}
#tabs {
position: absolute;
margin-top: 1px;
}
#tabs li {
float: left;
margin-right: 5px;
border: 1px solid #848484;
}
#tabs li.first {
}
#tabs li.last {
}
#tabs li.active {
border-bottom: 1px solid white;
}
#tabs li.active a {
background-color: white;
}
#tabs li.active a:hover {
background-color: white;
cursor: default;
border-bottom: 0;
}
#tabs li a {
display: block;
@ -162,16 +147,22 @@ a:hover {
text-decoration: none;
background-color: #acacac;
}
#tabs li.active a {
background-color: white;
}
#tabs li.active a:hover {
cursor: default;
background-color: white;
}
#content {
margin-top: 27px;
padding: 10px;
background-color: white;
height: 480px;
border: 1px solid #848484;
-webkit-transform: rotateX(0deg);
-webkit-transform: rotateX(0deg); /* DO NOT REMOVE! this fixes the UI freezing bug on MAC OS X */
}
#status-bar {
position: absolute;

View file

@ -4,7 +4,7 @@ $(document).ready(function() {
tabs = $('#tabs > ul');
$('a', tabs).click(function() {
if ($(this).parent().hasClass('active') == false) { // only initialize when the tab isn't already active
if (connectionId < 1) { // if there is no active connection, return
if (connectionId < 1 || configuration_received == false) { // if there is no active connection, return
return;
}

View file

@ -1,5 +1,6 @@
var connectionId = -1;
var connection_delay = 0; // delay which defines "when" will the configurator request configurator data after connection was established
var configuration_received = false;
var MSP_codes = {
MSP_IDENT: 100,
@ -170,6 +171,9 @@ $(document).ready(function() {
// Change port utilization to 0
$('span.port-usage').html('0%');
// reset valid config received variable (used to block tabs while not connected properly)
configuration_received = false;
$(this).text('Connect');
$(this).removeClass('active');
} else { // even number of clicks
@ -412,6 +416,7 @@ function process_message(code, data) {
}
// IDENT received, show the tab content
configuration_received = true;
$('#tabs li a:first').click();
break;
case MSP_codes.MSP_STATUS: