1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-24 16:55:24 +03:00

Auto merged - #2554 at Sun, 26 Sep 2021 08:17:10 GMT

Remove scrolling conditional and allow auto-detect board when no board selected
This commit is contained in:
J Blackman 2021-09-26 18:17:11 +10:00 committed by GitHub
commit 2dad799a78
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -90,9 +90,10 @@ firmware_flasher.initialize = function (callback) {
$(this).attr('target', '_blank');
});
$('div.release_info').slideDown();
$('.tab-firmware_flasher .content_wrapper').animate({ scrollTop: $('div.release_info').position().top }, 1000);
if (self.releases) {
$('div.release_info').slideDown();
$('.tab-firmware_flasher .content_wrapper').animate({ scrollTop: $('div.release_info').position().top }, 1000);
}
}
function process_hex(data, summary) {
@ -861,11 +862,9 @@ firmware_flasher.initialize = function (callback) {
});
function updateDetectBoardButton() {
const board = $('select[name="board"] option:selected').val();
const firmwareVersion = $('select[name="firmware_version"] option:selected').val();
const isDfu = portPickerElement.val().includes('DFU');
const isBusy = GUI.connect_lock;
const isLoaded = board !== '0' && firmwareVersion !== '0';
const isLoaded = self.releases ? Object.keys(self.releases).length > 1 : false;
const isAvailable = PortHandler.port_available || false;
const isButtonDisabled = isDfu || isBusy || !isLoaded || !isAvailable;