mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-14 03:49:53 +03:00
css3 compass O.o
This commit is contained in:
parent
a8c76cf278
commit
e1c1522da5
5 changed files with 109 additions and 2 deletions
|
@ -350,6 +350,96 @@ a:hover {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
line-height: 18px;
|
line-height: 18px;
|
||||||
}
|
}
|
||||||
|
.tab-initial_setup .compass-wrapper {
|
||||||
|
float: left;
|
||||||
|
|
||||||
|
margin-top: 100px;
|
||||||
|
margin-left: 80px;
|
||||||
|
|
||||||
|
border: 1px solid silver;
|
||||||
|
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
width: 150px;
|
||||||
|
height: 150px;
|
||||||
|
|
||||||
|
border: 6px dashed silver;
|
||||||
|
border-radius: 50%;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass span {
|
||||||
|
position: absolute;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass span:nth-child(1) {
|
||||||
|
left: 70px;
|
||||||
|
top: 5px;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass span:nth-child(2) {
|
||||||
|
right: 5px;
|
||||||
|
top: 70px;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass span:nth-child(3) {
|
||||||
|
left: 70px;
|
||||||
|
bottom: 5px;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass span:nth-child(4) {
|
||||||
|
left: 5px;
|
||||||
|
top: 70px;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass .pointer {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
height: 150px;
|
||||||
|
width: 150px;
|
||||||
|
|
||||||
|
-webkit-transform: rotate(0deg);
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass .pointer .tip {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
margin-top: 14px;
|
||||||
|
margin-left: -6px;
|
||||||
|
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
|
||||||
|
border-left: 10px solid transparent;
|
||||||
|
border-right: 10px solid transparent;
|
||||||
|
|
||||||
|
border-bottom: 30px solid red;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass .pointer .stick {
|
||||||
|
position: absolute;
|
||||||
|
display: block;
|
||||||
|
|
||||||
|
margin-top: -22px;
|
||||||
|
margin-right: 69px;
|
||||||
|
|
||||||
|
width: 4px;
|
||||||
|
height: 30px;
|
||||||
|
|
||||||
|
background-color: black;
|
||||||
|
}
|
||||||
|
.tab-initial_setup #compass .value {
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
top: 75px;
|
||||||
|
left: 53px;
|
||||||
|
|
||||||
|
width: 40px;
|
||||||
|
height: 16px;
|
||||||
|
line-height: 16px;
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
background-color: #f2f2f2;
|
||||||
|
|
||||||
|
border: 1px solid silver;
|
||||||
|
}
|
||||||
|
|
||||||
.tab-pid_tuning table {
|
.tab-pid_tuning table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
|
|
|
@ -34,7 +34,6 @@ $(document).ready(function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
// temporary
|
// temporary
|
||||||
//$('#content').load("./tabs/sensors.html", tab_initialize_sensors);
|
|
||||||
//$('#content').load("./tabs/initial_setup.html", tab_initialize_initial_setup);
|
//$('#content').load("./tabs/initial_setup.html", tab_initialize_initial_setup);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -64,4 +64,17 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="compass-wrapper">
|
||||||
|
<div id="compass">
|
||||||
|
<span>N</span>
|
||||||
|
<span>E</span>
|
||||||
|
<span>S</span>
|
||||||
|
<span>W</span>
|
||||||
|
<div class="pointer">
|
||||||
|
<span class="tip"></span>
|
||||||
|
<span class="stick"></span>
|
||||||
|
</div>
|
||||||
|
<div class="value"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -40,6 +40,10 @@ function data_poll() {
|
||||||
$('td.sats').html(GPS_DATA.numSat);
|
$('td.sats').html(GPS_DATA.numSat);
|
||||||
$('td.distToHome').html(GPS_DATA.distanceToHome);
|
$('td.distToHome').html(GPS_DATA.distanceToHome);
|
||||||
|
|
||||||
|
// Update Compass
|
||||||
|
$('div#compass .pointer').css('-webkit-transform', 'rotate(' + (SENSOR_DATA.kinematicsZ) + 'deg)');
|
||||||
|
$('div#compass .value').html(SENSOR_DATA.kinematicsZ + '°');
|
||||||
|
|
||||||
// Request new data
|
// Request new data
|
||||||
send_message(MSP_codes.MSP_ATTITUDE, MSP_codes.MSP_ATTITUDE);
|
send_message(MSP_codes.MSP_ATTITUDE, MSP_codes.MSP_ATTITUDE);
|
||||||
send_message(MSP_codes.MSP_RAW_GPS, MSP_codes.MSP_RAW_GPS);
|
send_message(MSP_codes.MSP_RAW_GPS, MSP_codes.MSP_RAW_GPS);
|
||||||
|
|
|
@ -33,7 +33,8 @@ function tab_initialize_receiver() {
|
||||||
shadowSize: 0,
|
shadowSize: 0,
|
||||||
yaxis : {
|
yaxis : {
|
||||||
max: 2200,
|
max: 2200,
|
||||||
min: 800
|
min: 800,
|
||||||
|
noTicks: 10
|
||||||
},
|
},
|
||||||
xaxis : {
|
xaxis : {
|
||||||
//noTicks = 0
|
//noTicks = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue