1
0
Fork 0
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:
mikeller 2018-07-15 23:39:18 +12:00
parent 25b49fb79f
commit b9358083d9
6 changed files with 102 additions and 4 deletions

View file

@ -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);