1
0
Fork 0
mirror of https://github.com/iNavFlight/inav-configurator.git synced 2025-07-14 20:10:11 +03:00

utilizing multiType

This commit is contained in:
cTn 2013-10-30 17:41:29 +01:00
parent 3c422cddc5
commit efd0286f99
4 changed files with 72 additions and 44 deletions

View file

@ -196,7 +196,7 @@ a:hover {
}
.tab-initial_setup .section {
clear: both;
padding-bottom: 10px;
padding-bottom: 8px;
}
.tab-initial_setup .section a {
display: block;
@ -241,12 +241,18 @@ a:hover {
border: 1px solid silver;
background-color: white;
}
#interactive_block .model {
display: block;
margin: 10px 0 0 10px;
font-weight: bold;
}
#interactive_block a.reset {
position: relative;
position: absolute;
display: block;
top: 265px;
left: 10px;
margin-left: 10px;
margin-top: 240px;
width: 100px;
height: 23px;
@ -257,6 +263,8 @@ a:hover {
border: 1px solid silver;
background-color: blue;
z-index: 100;
}
#interactive_block a.reset:hover {
text-decoration: none;

View file

@ -278,8 +278,8 @@ function onClosed(result) {
backgroundPage.connectionId = connectionId; // also pass latest connectionId to the background page
sensor_status(sensors_detected = 0); // reset active sensor indicators
$('#content').empty(); // empty content
$('#tabs > ul li').removeClass('active'); // de-select any selected tabs
tab_initialize_default();
console.log('Connection closed successfully.');
} else { // Something went wrong
@ -435,44 +435,6 @@ function process_message(code, data) {
$('.software-version').html(CONFIG.version);
// TODO: utilize this info
switch (CONFIG.multiType) {
case 1: // TRI
break;
case 2: // QUAD+
break;
case 3: // QUAD X
break;
case 4: // BI
break;
case 5: // GIMBAL
break;
case 6: // Y6
break;
case 7: // HEX 6
break;
case 8: // FLYING_WING
break;
case 9: // Y4
break;
case 10: // HEX6 X
break;
case 11: // OCTO X8
case 12:
case 13:
break;
case 14: // AIRPLANE
break;
case 15: // Heli 120
break;
case 16: // Heli 90
break;
case 17: // Vtail
break;
case 18: // HEX6 H
break;
}
// IDENT received, show the tab content
configuration_received = true;
$('#tabs li a:first').click();

View file

@ -26,6 +26,7 @@
</p>
</div>
<div id="interactive_block">
<span class="model"></span>
<a class="reset" href="#" title="Reset Z">Reset Z axis</a>
<div id="perspective">
<div id="cube">

View file

@ -7,6 +7,63 @@ function tab_initialize_initial_setup() {
$('input[name="pitch"]').val(CONFIG.accelerometerTrims[0]);
$('input[name="roll"]').val(CONFIG.accelerometerTrims[1]);
// Display multiType
var str = '';
switch (CONFIG.multiType) {
case 1: // TRI
str = 'TRI';
break;
case 2: // QUAD +
str = 'Quad +';
break;
case 3: // QUAD X
str = 'Quad X';
break;
case 4: // BI
str = 'BI';
break;
case 5: // GIMBAL
str = 'Gimbal';
break;
case 6: // Y6
str = 'Y6';
break;
case 7: // HEX 6
str = 'HEX 6';
break;
case 8: // FLYING_WING
str = 'Flying Wing';
break;
case 9: // Y4
str = 'Y4';
break;
case 10: // HEX6 X
str = 'HEX6 X';
break;
case 11: // OCTO X8
case 12:
case 13:
str = 'OCTO X8';
break;
case 14: // AIRPLANE
str = 'Airplane';
break;
case 15: // Heli 120
str = 'Heli 120';
break;
case 16: // Heli 90
str = 'Heli 90';
break;
case 17: // Vtail
str = 'Vtail';
break;
case 18: // HEX6 H
str = 'HEX6 H';
break;
}
$('span.model').html('Model: ' + str);
// UI Hooks
$('a.calibrateAccel').click(function() {
send_message(MSP_codes.MSP_ACC_CALIBRATION, MSP_codes.MSP_ACC_CALIBRATION);