mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-19 22:35:17 +03:00
Moved MSC button to blackbox tab.
This commit is contained in:
parent
b9358083d9
commit
3caf2d8ff5
6 changed files with 72 additions and 20 deletions
|
@ -610,18 +610,12 @@
|
|||
"initialSetupButtonRebootBootloader": {
|
||||
"message": "Activate Boot Loader / DFU"
|
||||
},
|
||||
"initialSetupButtonRebootMsc": {
|
||||
"message": "Activate Mass Storage Device Mode"
|
||||
},
|
||||
"initialSetupBackupRestoreText": {
|
||||
"message": "<strong>Backup</strong> your configuration in case of an accident, <strong>CLI</strong> settings are <span class=\"message-negative\">not</span> included - use the command 'diff all' in CLI for this."
|
||||
},
|
||||
"initialSetupRebootBootloaderText": {
|
||||
"message": "Reboot into <strong>boot loader / DFU</strong> mode."
|
||||
},
|
||||
"initialSetupRebootMscText": {
|
||||
"message": "Reboot into <strong>mass storage device (MSC)</strong> mode. Once activated, the onboard flash or SD card on your flight controller will be recognised as a storage device by your computer, and allow you to download your log files. Eject and power cycel your flight controller to leave mass storage device mode."
|
||||
},
|
||||
"initialSetupBackupSuccess": {
|
||||
"message": "Backup saved <span class=\"message-positive\">successfully</span>"
|
||||
},
|
||||
|
@ -3597,6 +3591,18 @@
|
|||
"onboardLoggingOnboardSDCard": {
|
||||
"message": "Onboard SD card"
|
||||
},
|
||||
"onboardLoggingMsc": {
|
||||
"message": "Mass Storage Mode"
|
||||
},
|
||||
"onboardLoggingMscNote": {
|
||||
"message": "Reboot into <strong>mass storage device (MSC)</strong> mode. Once activated, the onboard flash or SD card on your flight controller will be recognised as a storage device by your computer, and allow you to download your log files. Eject and power cycel your flight controller to leave mass storage device mode."
|
||||
},
|
||||
"onboardLoggingRebootMscText": {
|
||||
"message": "Activate Mass Storage Device Mode"
|
||||
},
|
||||
"onboardLoggingMscNotReady": {
|
||||
"message": "Mass storage mode can not be activated because the storage device is not ready."
|
||||
},
|
||||
"dialogConfirmResetTitle": {
|
||||
"message": "Confirm"
|
||||
},
|
||||
|
|
|
@ -206,6 +206,22 @@
|
|||
display: none;
|
||||
}
|
||||
|
||||
.require-msc-supported {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-onboard_logging.msc-supported .require-msc-supported {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.require-msc-not-ready {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-onboard_logging.msc-not-ready .require-msc-not-ready {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1055px) , only screen and (max-device-width: 1055px) {
|
||||
.tab-onboard_logging table thead tr:first-child {
|
||||
font-size: 12px;
|
||||
|
|
|
@ -146,6 +146,20 @@ TABS.onboard_logging.initialize = function (callback) {
|
|||
}
|
||||
}).change();
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
|
||||
if (SDCARD.supported || DATAFLASH.supported) {
|
||||
|
||||
$(".tab-onboard_logging")
|
||||
.toggleClass("msc-supported", true);
|
||||
|
||||
$('a.onboardLoggingRebootMsc').click(function () {
|
||||
var buffer = [];
|
||||
buffer.push(2);
|
||||
MSP.send_message(MSPCodes.MSP_SET_REBOOT, buffer, false);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
update_html();
|
||||
|
||||
GUI.content_ready(callback);
|
||||
|
@ -297,6 +311,18 @@ TABS.onboard_logging.initialize = function (callback) {
|
|||
.toggleClass("sdcard-initializing", SDCARD.state === MSP.SDCARD_STATE_CARD_INIT || SDCARD.state === MSP.SDCARD_STATE_FS_INIT)
|
||||
.toggleClass("sdcard-ready", SDCARD.state === MSP.SDCARD_STATE_READY);
|
||||
|
||||
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
|
||||
var mscIsReady = (DATAFLASH.totalSize > 0) || (SDCARD.state === MSP.SDCARD_STATE_READY);
|
||||
$(".tab-onboard_logging")
|
||||
.toggleClass("msc-not-ready", !mscIsReady);
|
||||
|
||||
if (!mscIsReady) {
|
||||
$('a.onboardLoggingRebootMsc').addClass('disabled');
|
||||
} else {
|
||||
$('a.onboardLoggingRebootMsc').removeClass('disabled');
|
||||
}
|
||||
}
|
||||
|
||||
switch (SDCARD.state) {
|
||||
case MSP.SDCARD_STATE_NOT_PRESENT:
|
||||
$(".sdcard-status").text(i18n.getMessage('sdcardStatusNoCard'));
|
||||
|
|
|
@ -73,15 +73,8 @@ TABS.setup.initialize = function (callback) {
|
|||
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
|
||||
|
|
|
@ -133,6 +133,23 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gui_box grey require-msc-supported">
|
||||
<div class="gui_box_titlebar" align="left">
|
||||
<div class="spacer_box_title" i18n="onboardLoggingMsc">
|
||||
</div>
|
||||
</div>
|
||||
<div class="spacer_box">
|
||||
<div class="require-msc-supported">
|
||||
<p i18n="onboardLoggingMscNote"></p>
|
||||
|
||||
<div>
|
||||
<a class="require-msc-ready regular-button onboardLoggingRebootMsc" href="#" i18n="onboardLoggingRebootMscText"></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="require-msc-not-ready" i18n="onboardLoggingMscNotReady"></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -49,9 +49,6 @@
|
|||
<div class="default_btn initialSetupRebootBootloader">
|
||||
<a class="rebootBootloader" href="#" i18n="initialSetupButtonRebootBootloader"></a>
|
||||
</div>
|
||||
<div class="default_btn intialSetupRebootMsc">
|
||||
<a class="rebootMsc" href="#" i18n="initialSetupButtonRebootMsc"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="threefourth_right setupinfo">
|
||||
|
@ -70,9 +67,6 @@
|
|||
<div class="cell_setup initialSetupRebootBootloader">
|
||||
<span i18n="initialSetupRebootBootloaderText"></span>
|
||||
</div>
|
||||
<div class="cell_setup intialSetupRebootMsc">
|
||||
<span i18n="initialSetupRebootMscText"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modelwrapper"></div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue