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

Added bind button for receivers that support it.

This commit is contained in:
Michael Keller 2020-02-06 15:12:13 +13:00 committed by mikeller
parent 2925646d82
commit c2575935fc
5 changed files with 21 additions and 1 deletions

View file

@ -325,6 +325,16 @@ TABS.receiver.initialize = function (callback) {
});
});
let showBindButton = false;
if (semver.gte(CONFIG.apiVersion, "1.43.0")) {
showBindButton = bit_check(CONFIG.targetCapabilities, FC.TARGET_CAPABILITIES_FLAGS.SUPPORTS_RX_BIND);
$("a.bind").click(function() {
MSP.send_message(MSPCodes.MSP2_BETAFLIGHT_BIND);
});
}
$(".bind_btn").toggle(showBindButton);
// RC Smoothing
if (semver.gte(CONFIG.apiVersion, "1.40.0")) {
$('.tab-receiver .rcSmoothing').show();