1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 22:35:23 +03:00

Added Motor Mix Diagrams

This commit is contained in:
CurtisFissel 2014-07-24 23:26:11 -04:00
parent 1c8faa5b13
commit d379cdfcf2
3 changed files with 77 additions and 1 deletions

View file

@ -60,6 +60,21 @@
font-weight: bold;
}
#interactive_block .modelMixDiagram {
position: absolute;
top: 32px;
left: 10px;
height: 30%; /* interactive_block height set to inherit */
}
#interactive_block .modelMixCustom { /* Position question mark correctly */
height: 20%; /* resize question mark */
padding-left: 25px;
}
#interactive_block .heading {
float: right;
height: 15px;

View file

@ -22,6 +22,7 @@
</div>
<div id="interactive_block">
<span class="model"></span>
<img class="modelMixDiagram" src="" alt="">
<span class="heading"></span>
<div class="clear-both"></div>
<a class="reset" href="#" i18n="initialSetupButtonResetZaxis"></a>

View file

@ -100,12 +100,72 @@ tabs.initial_setup.initialize = function(callback) {
case 20: // Dualcopter
str = 'Dualcopter';
break;
case 21: //
case 21: // Singlecopter
str = 'Singlecopter';
break;
}
$('span.model').text(chrome.i18n.getMessage('initialSetupModel', [str]));
// Model Mix Diagram selection
switch (CONFIG.multiType) {
case 1: // TRI
$(".modelMixDiagram").attr("src","./images/motor_order/tri.svg"); // Change image
$(".modelMixDiagram").addClass( 'modelMixTri' ); //Set specific class per model type
break;
case 2: // QUAD +
$(".modelMixDiagram").attr("src","./images/motor_order/quadp.svg");
$(".modelMixDiagram").addClass( 'modelMixQuadP' );
break;
case 3: // QUAD X
$(".modelMixDiagram").attr("src","./images/motor_order/quadx.svg");
$(".modelMixDiagram").addClass( 'modelMixQuadX' );
break;
case 6: // Y6
$(".modelMixDiagram").attr("src","./images/motor_order/y6.svg");
$(".modelMixDiagram").addClass( 'modelMixY6' );
break;
case 7: // HEX 6
$(".modelMixDiagram").attr("src","./images/motor_order/hex6p.svg");
$(".modelMixDiagram").addClass( 'modelMixHex6P' );
break;
case 9: // Y4
$(".modelMixDiagram").attr("src","./images/motor_order/y4.svg");
$(".modelMixDiagram").addClass( 'modelMixY4' );
break;
case 10: // HEX6 X
$(".modelMixDiagram").attr("src","./images/motor_order/hex6x.svg");
$(".modelMixDiagram").addClass( 'modelMixHex6X' );
break;
case 11: // OCTO X8
case 12:
case 13:
$(".modelMixDiagram").attr("src","./images/motor_order/octox.svg");
$(".modelMixDiagram").addClass( 'modelMixOctoX' );
break;
case 4: // BI
case 5: // GIMBAL
case 8: // FLYING_WING
case 14: // AIRPLANE
case 15: // Heli 120
case 16: // Heli 90
case 17: // Vtail
case 18: // HEX6 H
case 19: // PPM to SERVO
case 20: // Dualcopter
case 21: // Singlecopter
$(".modelMixDiagram").attr("src","./images/motor_order/custom.svg");
$(".modelMixDiagram").addClass( 'modelMixCustom' );
break;
default:
$(".modelMixDiagram").attr("src","./images/motor_order/custom.svg");
$(".modelMixDiagram").addClass( 'modelMixCustom' );
break;
}
// Heading
$('span.heading').text(chrome.i18n.getMessage('initialSetupheading', [0]));
// UI Hooks