mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 14:25:14 +03:00
Added buttons for reboot into boot loader and MSC modes.
This commit is contained in:
parent
25b49fb79f
commit
b9358083d9
6 changed files with 102 additions and 4 deletions
|
@ -59,9 +59,31 @@ TABS.setup.initialize = function (callback) {
|
|||
|
||||
self.initializeInstruments();
|
||||
|
||||
|
||||
$('#arming-disable-flag-row').attr('title', i18n.getMessage('initialSetupArmingDisableFlagsTooltip'));
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
|
||||
if (isExpertModeEnabled()) {
|
||||
$('.initialSetupRebootBootloader').show();
|
||||
} else {
|
||||
$('.initialSetupRebootBootloader').hide();
|
||||
}
|
||||
|
||||
$('a.rebootBootloader').click(function () {
|
||||
var buffer = [];
|
||||
buffer.push(1);
|
||||
MSP.send_message(MSPCodes.MSP_SET_REBOOT, buffer, false);
|
||||
});
|
||||
|
||||
$('a.rebootMsc').click(function () {
|
||||
var buffer = [];
|
||||
buffer.push(2);
|
||||
MSP.send_message(MSPCodes.MSP_SET_REBOOT, buffer, false);
|
||||
});
|
||||
} else {
|
||||
$('.initialSetupRebootBootloader').hide();
|
||||
$('.initialSetupRebootMsc').hide();
|
||||
}
|
||||
|
||||
// UI Hooks
|
||||
$('a.calibrateAccel').click(function () {
|
||||
var self = $(this);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue