mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-19 14:25:20 +03:00
removing various elements from initial tab
This commit is contained in:
parent
fdbfdfd31d
commit
e8c46d1f25
2 changed files with 3 additions and 96 deletions
|
@ -28,34 +28,6 @@
|
||||||
<span class="heading"></span>
|
<span class="heading"></span>
|
||||||
<a class="reset" href="#" i18n="initialSetupButtonResetZaxis"></a>
|
<a class="reset" href="#" i18n="initialSetupButtonResetZaxis"></a>
|
||||||
</div>
|
</div>
|
||||||
<div class="block mixer">
|
|
||||||
<span class="head" i18n="initialSetupMixerHead"></span>
|
|
||||||
<img class="preview" src="" />
|
|
||||||
<select name="mixer">
|
|
||||||
<option value="1">TRI</option>
|
|
||||||
<option value="2">Quad +</option>
|
|
||||||
<option value="3">Quad X</option>
|
|
||||||
<option value="4">BI</option>
|
|
||||||
<option value="5">Gimbal</option>
|
|
||||||
<option value="6">Y 6</option>
|
|
||||||
<option value="7">HEX 6</option>
|
|
||||||
<option value="8">Flying Wing</option>
|
|
||||||
<option value="9">Y 4</option>
|
|
||||||
<option value="10">HEX 6 X</option>
|
|
||||||
<option value="11">OCTO X8</option>
|
|
||||||
<option value="12">OCTO Flat +</option>
|
|
||||||
<option value="13">OCTO Flat X</option>
|
|
||||||
<option value="14">Airplane</option>
|
|
||||||
<option value="15">Heli 120</option>
|
|
||||||
<option value="16">Heli 90</option>
|
|
||||||
<option value="17">Vtail 4</option>
|
|
||||||
<option value="18">Hex 6 H</option>
|
|
||||||
<option value="19">PPM to SERVO</option>
|
|
||||||
<option value="20">Dualcopter</option>
|
|
||||||
<option value="21">Singlecopter</option>
|
|
||||||
<option value="22">Custom</option>
|
|
||||||
</select>
|
|
||||||
</div>
|
|
||||||
<div class="block info">
|
<div class="block info">
|
||||||
<span class="head" i18n="initialSetupInfoHead"></span>
|
<span class="head" i18n="initialSetupInfoHead"></span>
|
||||||
<div class="fields">
|
<div class="fields">
|
||||||
|
@ -129,8 +101,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="buttons">
|
<div class="buttons">
|
||||||
<a class="update" href="#" i18n="initialSetupButtonSave"></a>
|
<a class="update" href="#" i18n="initialSetupButtonSave"></a>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -46,71 +46,6 @@ TABS.initial_setup.initialize = function (callback) {
|
||||||
|
|
||||||
// set heading in interactive block
|
// set heading in interactive block
|
||||||
$('span.heading').text(chrome.i18n.getMessage('initialSetupheading', [0]));
|
$('span.heading').text(chrome.i18n.getMessage('initialSetupheading', [0]));
|
||||||
|
|
||||||
// UI hook handling mixer type change that swaps the image representation
|
|
||||||
$('.mixer select').change(function () {
|
|
||||||
var val = $(this).val();
|
|
||||||
|
|
||||||
var imageArray = [
|
|
||||||
'custom', // there is no type 0, we will use custom image as spacer
|
|
||||||
'tri',
|
|
||||||
'quadp',
|
|
||||||
'quadx',
|
|
||||||
'custom', // bi
|
|
||||||
'custom', // gimbal
|
|
||||||
'y6',
|
|
||||||
'hex6p',
|
|
||||||
'custom', // flying wing
|
|
||||||
'y4',
|
|
||||||
'hex6x',
|
|
||||||
'octox',
|
|
||||||
'octox',
|
|
||||||
'octox',
|
|
||||||
'airplane',
|
|
||||||
'custom',
|
|
||||||
'custom',
|
|
||||||
'vtail',
|
|
||||||
'custom',
|
|
||||||
'custom',
|
|
||||||
'custom',
|
|
||||||
'custom',
|
|
||||||
'custom',
|
|
||||||
];
|
|
||||||
|
|
||||||
$('.mixer .preview').attr('src', './images/motor_order/' + imageArray[val] + '.svg');
|
|
||||||
});
|
|
||||||
|
|
||||||
// update mixer type with current value
|
|
||||||
$('.mixer select').val(BF_CONFIG.mixerConfiguration).change();
|
|
||||||
|
|
||||||
// save
|
|
||||||
$('a.update').click(function () {
|
|
||||||
// update object
|
|
||||||
BF_CONFIG.mixerConfiguration = parseInt($('.mixer select').val());
|
|
||||||
|
|
||||||
function save_to_eeprom() {
|
|
||||||
MSP.send_message(MSP_codes.MSP_EEPROM_WRITE, false, false, reboot);
|
|
||||||
}
|
|
||||||
|
|
||||||
function reboot() {
|
|
||||||
GUI.log(chrome.i18n.getMessage('initialSetupEepromSaved'));
|
|
||||||
|
|
||||||
GUI.tab_switch_cleanup(function() {
|
|
||||||
MSP.send_message(MSP_codes.MSP_SET_REBOOT, false, false, reinitialize);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function reinitialize() {
|
|
||||||
GUI.log(chrome.i18n.getMessage('deviceRebooting'));
|
|
||||||
|
|
||||||
MSP.send_message(MSP_codes.MSP_IDENT, false, false, function () {
|
|
||||||
GUI.log(chrome.i18n.getMessage('deviceReady'));
|
|
||||||
TABS.initial_setup.initialize();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
MSP.send_message(MSP_codes.MSP_SET_CONFIG, MSP.crunch(MSP_codes.MSP_SET_CONFIG), false, save_to_eeprom);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
// old stuff
|
// old stuff
|
||||||
$('.COMPATIBILITY').show();
|
$('.COMPATIBILITY').show();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue