mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +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
|
@ -46,71 +46,6 @@ TABS.initial_setup.initialize = function (callback) {
|
|||
|
||||
// set heading in interactive block
|
||||
$('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 {
|
||||
// old stuff
|
||||
$('.COMPATIBILITY').show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue